[xslt] Working with lots of XML files

Hi all

I have an index.xml that points to about 300 xml Files.

index.xml looks like:
<item file="/somewhere/file1.xml"/>
<item file="/somewhere/file2.xml"/>


<item file="/somewhere/file300.xml"/>
file1.xml looks like:
<position num="1" price="100"/>
<position num="2" price="300"/>
<position num="1000" price="30"/>

Now I want to build the sum of all prices.

The stylesheet is easy made:

<xsl:for-each select="/all/item">
<xsl:apply-templates select="exsl:node-set(document(@file))" mode="makesum"/>

<xsl:template match="*" mode="makesum">
make sum


The problem I have, is that xsltproc at the moment needs about 200MB Ram to 
this and the list of XML Files will grow maybe up to 10000 in the next

My question:

Isn't it possible to load an XML file using the document() function and
than free the memory again after processing the file?
Is this not possible because of the xSLT Spezification or could
this be optimized with an improved libxslt implementation?
Or with an opimized stylesheet?

I have to make some decisions now, that will effect the scaleability
of my software in some year.

It would be nice to get some hints on this.

Bernhard Zwischenbrugger

This mail sent through IMP: http://horde.org/imp/

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]