Re: [xsl] XSLT internal tree representation in memory

Subject: Re: [xsl] XSLT internal tree representation in memory
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Thu, 25 Sep 2003 12:14:35 +0200

The XSLT processor jd.xslt [1] together with jd.bigxml [2] is a solution to transform huge XML documents without the need to completely load the document into memory, so they may provide a solution for your task.



At 10:42 24.09.2003 -0400, you wrote:

This is my first posting to the XSL-List and I am fairly new to XSLT. Does
the XSLT transformer need to load in the whole source document in memory in
order to read and parse it to create the internal representation of the tree
in memory? Michael Kay's book has an explanation of how the transformer
process works in his XSLT 2nd edition, page 75, but it is unclear to me if
it needs to load the whole source document into memory before the process
can start.  I have searched the XSL FAQ archives and found two similar
issues where the users are transforming large source documents and are
getting Java out-of-memory exceptions. One suggestion was to use a database
to store the stylesheets and divide up the tasks. This is not an option for
me and the source documents to transform may be as large as 2 gig. Another
suggestion I saw on the FAQ was to divide the file into chunks and transform
the pieces and concatentate it back into one big file.

I have created a simple Java prototype that takes in (from disk) a xslt
stylesheet (file) and an xml source document (file) to transform it into
another xml source document. I am using JAXP and the StreamSource class to
transform the data and am currently using small source files to test my XSLT
style sheets.

Thank you for any suggestions or help that you can provide.


XSL-List info and archive:

XSL-List info and archive:

Current Thread