On 27 May 2004, at 17:34, Greg Weinger wrote:

Hi,

The way your stylesheet is written can also create OutOfMemoryErrors. If your xpaths require that the entire document be held in memory before it is written, then you can run out of memory quickly.

This is, alas, still the behaviour of every XSLT engine out there. It's not a full DOM which gets built, but still it's a table/tree representation of the entire input document - so you need memory to handle large input documents. Some XSLT engines do however start writing out output before the transformation is completed, which gives slightly better response times, but just masks the problem. Or it must be that recent Xalan/Saxon iterations finally tackled this.


In your templates try to use absolute xpaths (/document/path/to/node) instead of inexact (//node).

This is of course a good XSLT practice.

</Steven>
--
Steven Noels                            http://outerthought.org/
Outerthought - Open Source Java & XML            An Orixo Member
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org



Reply via email to