[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Need to read a complete Folder with different XML
Claudia Smith wrote: Hi, > I have a requirement to read the complete folder which consist > of different xml files and then use XSLT to work on each file > on the folder. The structure of the xml for each file is the > same. The usual solutions are: 1/ write your stylesheet to make one transform and configure your processing environment to call it once per file 2/ pass all the files as document nodes in a param, and loop over them in the stylesheet 3/ pass all the files as file names (strings or URIs) in a param, and loop over them in the stylesheet (using doc() then processing each doc) 4/ using an implementation-defined mechanism like Saxon's globbing support for collection(), so you can write something like: collection('dir?select=*.xml'), see http://saxonica.com/documentation/sourcedocs/collections.xml 5/ using filesystem-related extension functions, like the EXPath File module, see http://expath.org/spec/file The actual choice depends on what control you have on your calling environment and what extensions your processor actually supports. Regards, -- Florent Georges http://fgeorges.org/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|