Re: [xslt] Working with lots of XML files
- From: Bruce Miller <bruce miller nist gov>
- To: xslt gnome org
- Subject: Re: [xslt] Working with lots of XML files
- Date: Tue, 21 Oct 2003 11:31:17 -0400
Bernhard Zwischenbrugger wrote:
[..]
> The stylesheet is easy made:
>
> <xsl:for-each select="/all/item">
> <xsl:apply-templates select="exsl:node-set(document(@file))" mode="makesum"/>
> </xsl:for-each>
>
> <xsl:template match="*" mode="makesum">
> ....
> make sum
> ...
> </xsl:template>
>
> -----------------
>
> The problem I have, is that xsltproc at the moment needs about 200MB Ram to
> process
> this and the list of XML Files will grow maybe up to 10000 in the next
> years.
I've been getting in the habit of using a hybrid of xslt + DOM manipulation
(whatever binding you like; Python, Perl's XML::LibXML), whenver the XSL
would get too `nasty'. Here you're xsl is simple enough, but ...
Anyway, have you considered computing the sum in some other language?
Loop over the files, for each file:
read it in, compute partial sum, then the doc gets freed.
It would be essentially as simple as your stylesheet, providing it
fits into your `pipeline'...
--
bruce.miller@nist.gov
http://math.nist.gov/~BMiller/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]