Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - How can I process multiple input files? [Thread Next] Re: How can I process multiple input files?To: NULL Date: 9/1/2004 6:16:00 PM Esther wrote: > Could anyone point me in the right direction as far as finding info on > processing multiple files? > > Background: We have a multi-system application that includes an art > management system, content management system, and publisher (to PDF). > A new output format is being added, and I've been told that I need to > develop a stylesheet that can loop through a directory of files and > process each in turn, adding them to a single output file. > > So, for example, I have DirectoryA, which contains PubFile1, > ActivityFile1A, ActivityFile1B, PubFile2, ActivityFile2A, > ActivityFile2B. What I need to do is take a few pieces of info from > PubFile1 and start an output file (Output1). Then, I need to loop > through all related ActivityFile documents and add the output of those > to the Output1 file. When that is complete, I need to move on to > PubFile2 and create Output2, looping through the ActivityFile2 docs > and adding their output to Output2. > > I'm very new to XSLT, and although I've gotten to be fairly > comfortable navigating through single input docs, I have no idea how > to go about this. Any help would be much appreciated (since I'm on the > digest, an off-list reply would be even more appreciated...) XSLT 1.0 defines a function named document to allow you to access secondary XML input files e.g. <xsl:for-each select="document('whatever.xml')/element/child"> besides the primary input file. XSLT 1.0 has no mechanisms to create several output files, you need an XSLT processor that supports an extension to create multiple output files. Saxon from http://saxon.sf.net/ for example supports such an extension. -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
