Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How can I process multiple input files?

From: Martin Honnen <mahotrash@-----.-->
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent