RE: SAXON: out of memory

Subject: RE: SAXON: out of memory
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 30 Jul 1999 09:53:59 +0100
> I compiled the following stylesheet with SAXON, and when I tried to
> apply it on a 2megs file it stoped with: out of memory.
> Are there any solution for such a big file?

2Mb is normally manageable, but it will depend on the detailed configuration
and the details of your XML documents. You could try raising the Java VM
memory limits.

It's because of this memory limit that I introduced serial processing (and
serial stylesheets) in SAXON, the idea being that you would do a first pass
which splits the document into chunks which can then be processed one at a
time. Unfortunately serial processing is dropped from the latest version
(the class hierarchy was becoming too complicated) but the requirement is
still there and I intend to reintroduce something similar in future. I'm
toying with the idea of a "branch at a time" mode where, at some level of
the source tree, you build a branch of the tree in memory, process it using
XSL, and then discard it from memory. One approach to this would be an input
filter that presents the big input document as a sequence of small input
documents. 

 
> I wrote a small Java program to do the same, but with Propagator (and
> Wanderer) it said the same. I "solved" the problem with using
> Distributor, but it would be better for me to write 
> stylesheets instead of java. (I am not a computer programmer. :-(( ) 
> 
Did you try a "Serial Style Sheet"? They were introduced for this purpose.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread