using document() with multiple files

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

using document() with multiple files

Huditsch, Roman (LNG-VIE)
Hi,

I just came accross the Saxon announcement for version 8.5, where
Michael posted some very interesting information about the document()
function:

        <cite>
        * Ability for the collection() function to process a directory,
for example
       
       
collection("dir?recurse=yes;select=*.html;parser=org.ccil.cowan.tagsoup.
Parser")

        returns all the *.html files in the given directory, expanded
recursively,
        using John Cowan's TagSoup parser to convert them on-the-fly to
XML

        * Similar ability to use URI query parameters in the document()
and doc()
        functions (if enabled from the command line)
        </cite>

I think that is exactly what I am looking for.
I tried to use this syntax in an Xpath expression like this:

document('file:///R://Samples//Richtlinien//VereinsR//?recurse=no;select
=*.xml')/*[.//randziffer/rz-zaehlung, 'RZ
'))='14']//kopf/va-info/ausfertigungsdatum/@datum

I am looking for the specific file in a directory which contains "14" in
its <rz-zaehlung>.

Unfortunately Saxon gives me an FODC005
java.io.FileNotFoundException.....
I tried it with different writing styles but with no success.
Can you help me?

all the best,
Roman

_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail [hidden email]
www.lexisnexis.at


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: using document() with multiple files

Colin Paul Adams
Perhaps you would get better results if you spelt collection:
collection

rather than

docment

:-)
--
Colin Adams
Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

AW: using document() with multiple files

Huditsch, Roman (LNG-VIE)
In reply to this post by Huditsch, Roman (LNG-VIE)
*g* sure, but the announcments says that the same is available for document(), too, doesn't it?
Or have I read it wrong?

wbr,
Roman

_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail [hidden email]
www.lexisnexis.at
 

> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag
> von Colin Paul Adams
> Gesendet: Freitag, 28. Oktober 2005 09:54
> An: [hidden email]
> Betreff: Re: [saxon] using document() with multiple files
>
> Perhaps you would get better results if you spelt collection:
> collection
>
> rather than
>
> docment
>
> :-)
> --
> Colin Adams
> Preston Lancashire
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: AW: using document() with multiple files

Colin Paul Adams
>>>>> "Roman" == Huditsch Roman <[hidden email]> writes:

    Roman> *g* sure, but the announcments says that the same is
    Roman> available for document(), too, doesn't it?  Or have I read
    Roman> it wrong?

Yes, I think you must have done.
As I read it, the -p command line option enables certain query
parameters for doc (and hence document).

But these parameters are enumerated as validation, strip-space and
parser.

There is no mention of recurse and select.
--
Colin Adams
Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

AW: AW: using document() with multiple files

Huditsch, Roman (LNG-VIE)
In reply to this post by Huditsch, Roman (LNG-VIE)
Ah, I see. Thank you very very much! I just tried it with collection() and it works out prety fine :)
Just have to find out, why there is an empty sequence coming back.
Must have something to do with my Xpath query....

Thanks a lot Colin.

wbr,
Roman

_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail [hidden email]
www.lexisnexis.at
 

> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag
> von Colin Paul Adams
> Gesendet: Freitag, 28. Oktober 2005 10:10
> An: [hidden email]
> Betreff: Re: AW: [saxon] using document() with multiple files
>
> >>>>> "Roman" == Huditsch Roman <[hidden email]> writes:
>
>     Roman> *g* sure, but the announcments says that the same is
>     Roman> available for document(), too, doesn't it?  Or have I read
>     Roman> it wrong?
>
> Yes, I think you must have done.
> As I read it, the -p command line option enables certain
> query parameters for doc (and hence document).
>
> But these parameters are enumerated as validation,
> strip-space and parser.
>
> There is no mention of recurse and select.
> --
> Colin Adams
> Preston Lancashire
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: using document() with multiple files

Rob Koberg
ufff... I hope what you are doing is for offline/non-runtime generation.
In other words use the right tool for the job. Loading DOMs to search is
not really that performant...



Huditsch Roman wrote:

> Ah, I see. Thank you very very much! I just tried it with collection() and it works out prety fine :)
> Just have to find out, why there is an empty sequence coming back.
> Must have something to do with my Xpath query....
>
> Thanks a lot Colin.
>
> wbr,
> Roman
>
> _______________________________________
>
> Roman Huditsch
> IT and Electronic Publishing
> LexisNexis ARD Orac
> Marxergasse 25
> 1030 Vienna
> Austria
> ph: +43-1-534 52-1514
> f: +43-1-534 52-140
> e-mail [hidden email]
> www.lexisnexis.at
>  
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: [hidden email]
>>[mailto:[hidden email]] Im Auftrag
>>von Colin Paul Adams
>>Gesendet: Freitag, 28. Oktober 2005 10:10
>>An: [hidden email]
>>Betreff: Re: AW: [saxon] using document() with multiple files
>>
>>
>>>>>>>"Roman" == Huditsch Roman <[hidden email]> writes:
>>
>>    Roman> *g* sure, but the announcments says that the same is
>>    Roman> available for document(), too, doesn't it?  Or have I read
>>    Roman> it wrong?
>>
>>Yes, I think you must have done.
>>As I read it, the -p command line option enables certain
>>query parameters for doc (and hence document).
>>
>>But these parameters are enumerated as validation,
>>strip-space and parser.
>>
>>There is no mention of recurse and select.
>>--
>>Colin Adams
>>Preston Lancashire


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

AW: AW: AW: using document() with multiple files

Huditsch, Roman (LNG-VIE)
In reply to this post by Huditsch, Roman (LNG-VIE)
*g* Luckily, it is for an offline usage.
I am trying to write some kind of linking tool, which is able to detect links
and generate the needed markup.
Performance is not that important but I am currently trying to tune up my stylesheet
as much as possible...
But at the moment it is very very slow.....

wbr,
Roman

_______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail [hidden email]
www.lexisnexis.at
 

> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag
> von Robert Koberg
> Gesendet: Freitag, 28. Oktober 2005 10:20
> An: [hidden email]
> Betreff: Re: AW: AW: [saxon] using document() with multiple files
>
> ufff... I hope what you are doing is for offline/non-runtime
> generation.
> In other words use the right tool for the job. Loading DOMs
> to search is not really that performant...
>
>
>
> Huditsch Roman wrote:
> > Ah, I see. Thank you very very much! I just tried it with
> collection() and it works out prety fine :)
> > Just have to find out, why there is an empty sequence coming back.
> > Must have something to do with my Xpath query....
> >
> > Thanks a lot Colin.
> >
> > wbr,
> > Roman
> >
> > _______________________________________
> >
> > Roman Huditsch
> > IT and Electronic Publishing
> > LexisNexis ARD Orac
> > Marxergasse 25
> > 1030 Vienna
> > Austria
> > ph: +43-1-534 52-1514
> > f: +43-1-534 52-140
> > e-mail [hidden email]
> > www.lexisnexis.at
> >  
> >
> >
> >>-----Ursprüngliche Nachricht-----
> >>Von: [hidden email]
> >>[mailto:[hidden email]] Im Auftrag
> >>von Colin Paul Adams
> >>Gesendet: Freitag, 28. Oktober 2005 10:10
> >>An: [hidden email]
> >>Betreff: Re: AW: [saxon] using document() with multiple files
> >>
> >>
> >>>>>>>"Roman" == Huditsch Roman
> <[hidden email]> writes:
> >>
> >>    Roman> *g* sure, but the announcments says that the same is
> >>    Roman> available for document(), too, doesn't it?  Or
> have I read
> >>    Roman> it wrong?
> >>
> >>Yes, I think you must have done.
> >>As I read it, the -p command line option enables certain
> >>query parameters for doc (and hence document).
> >>
> >>But these parameters are enumerated as validation,
> >>strip-space and parser.
> >>
> >>There is no mention of recurse and select.
> >>--
> >>Colin Adams
> >>Preston Lancashire
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: using document() with multiple files

Michael Kay
In reply to this post by Huditsch, Roman (LNG-VIE)
As Colin pointed out:

with document, one URI identifies one document. So "select" and "recurse"
don't make (much) sense. Use collection, where one URI identifies a set of
documents.

Also, query parameters in document() aren't recognized unless you enable
this using the -p option.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Huditsch Roman
> Sent: 28 October 2005 08:47
> To: [hidden email]
> Subject: [saxon] using document() with multiple files
>
> Hi,
>
> I just came accross the Saxon announcement for version 8.5, where
> Michael posted some very interesting information about the document()
> function:
>
> <cite>
> * Ability for the collection() function to process a directory,
> for example
>
>
> collection("dir?recurse=yes;select=*.html;parser=org.ccil.cowa
n.tagsoup.

> Parser")
>
> returns all the *.html files in the given directory, expanded
> recursively,
> using John Cowan's TagSoup parser to convert them on-the-fly to
> XML
>
> * Similar ability to use URI query parameters in the document()
> and doc()
> functions (if enabled from the command line)
> </cite>
>
> I think that is exactly what I am looking for.
> I tried to use this syntax in an Xpath expression like this:
>
> document('file:///R://Samples//Richtlinien//VereinsR//?recurse
=no;select

> =*.xml')/*[.//randziffer/rz-zaehlung, 'RZ
> '))='14']//kopf/va-info/ausfertigungsdatum/@datum
>
> I am looking for the specific file in a directory which
> contains "14" in
> its <rz-zaehlung>.
>
> Unfortunately Saxon gives me an FODC005
> java.io.FileNotFoundException.....
> I tried it with different writing styles but with no success.
> Can you help me?
>
> all the best,
> Roman
>
> _______________________________________
>
> Roman Huditsch
> IT and Electronic Publishing
> LexisNexis ARD Orac
> Marxergasse 25
> 1030 Vienna
> Austria
> ph: +43-1-534 52-1514
> f: +43-1-534 52-140
> e-mail [hidden email]
> www.lexisnexis.at
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help