[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

How to run xquery dynamically on file listingfromdirectory

Michael Kay mike at saxonica.com
Sat Apr 12 14:09:35 PDT 2008


  How to run xquery dynamically on file
	listingfromdirectory
> 
> The description of what Saxon will accept as argument to the 
> collection function is given at
> 
> http://www.saxonica.com/documentation/sourcedocs/collections.html
> 
> This includes the option of using a file scheme URI of a 
> directory. It also includes options such as 
> http://temp.dir?recurse=yes which processes the directory 
> contents recursively, and http://temp.dir?select=*.xml which 
> processes selected files within the directory.

I meant, of course, file:///temp.dir?recurse=yes and
file:///temp.dir?select=*.xml

Michael Kay
http://www.saxonica.com/ 
> 
> > -----Original Message-----
> > From: bryan rasmussen [mailto:http://x-query.com/mailman/listinfo/talk]
> > Sent: 12 April 2008 12:53
> > To: Michael Kay
> > Cc: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
> > Subject: Re:  How to run xquery dynamically on file 
> > listing fromdirectory
> > 
> > so you're saying Saxon will accept a file scheme uri to the 
> directory?
> > Just to clarify.
> > Cheers,
> > Bryan Rasmussen
> > 
> > On Thu, Apr 10, 2008 at 11:48 PM, Michael Kay <http://x-query.com/mailman/listinfo/talk> 
> > wrote:
> > >
> > >  >Is there anyway to do something like:
> > >     for $x in collection("xmlfiles")  where 'xmlfiles' is a 
> > > subdirectory containing the actual
> > xml files I
> > > want to
> > >
> > >  use?  I would need to know the exact syntax, as this is
> > all new to me.
> > >
> > >
> > >  As others have said, the interpretation of the URI passed to
> > > collection() is  very much processor-dependent. Altova have
> > their own
> > > XQuery processor, and I  would imagine it treats
> > collection() in the
> > > same way as their XSLT
> > >  processor: in their 2007 product that's effectively a null 
> > > implementation,  in the 2008 version it does roughly the same as
> > > Saxon: you can either  specify a directory name, or the
> > name of an XML
> > > file that acts as a catalog  of the collection. IIRC, they don't 
> > > provide the ability to filter the  contents of the directory.
> > >
> > >  Michael Kay
> > >  http://www.saxonica.com/
> > >
> > >
> > >
> > >
> > >  _______________________________________________
> > >  http://x-query.com/mailman/listinfo/talk
> > >  http://x-query.com/mailman/listinfo/talk
> > >
> 
> _______________________________________________
> http://x-query.com/mailman/listinfo/talk
> http://x-query.com/mailman/listinfo/talk



Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.