xsl-list
[Top] [All Lists]

RE: [xsl] Working with Collections

2008-04-28 21:41:42

You say you want to combine all the documents into one big document. You can
certainly do that, for example

<xsl:variable name="bigDoc">
  <xsl:copy-of select=="collection(...)"/>
</xsl:variable>

But you also say that this gives you memory problems. So I think you need to
explain why you feel you need to do this. You say "I need to be able to
traverse the entire collection" but that doesn't appear to justify doing it
this way.

What transformation are you actually trying to perform?

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Craig Branham [mailto:ccbranham(_at_)hotmail(_dot_)com] 
Sent: 28 April 2008 17:41
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Working with Collections

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.
  

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>