Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Working with Collections


Subject: [xsl] Working with Collections
From: "Craig Branham" <ccbranham@xxxxxxxxxxx>
Date: Mon, 28 Apr 2008 09:41:07 -0700

Dear List:

I have a set of large input files (all with the same structure) to process with collection() and an external collection file that shows which input files to process, and in what order, to a single output file.

Is there a way to join all these documents below the top level element and process their contents as though they were a single input file?

A <xsl:for-each/> approach processes each document in the collection in turn, which I don't want (I need to be able to traverse the entire collection):

<xsl:template match="/">
   <mytop>
       <xsl:for-each select="collection('collection.xml')">
           <xsl:apply-templates select="yourtop/yourcontent"/>
       </xsl:for-each>
   </mytop>
</xsl:template>

I could also abandon using collections and use:

     <xsl:apply-templates
select="...|document('x')/...|document('y')/..."/>

but I would rather have a separate collection file for extensibility and flexibility if possible.

I've tried creating a temporary tree, but have run into memory problems doing this that I'd rather not deal with.

Does anyone have any advice?

Many Thanks,

Craig B.


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor