Project

Profile

Help

XSLT tranformation and large documents

Added by Anonymous over 19 years ago

Legacy ID: #2775886 Legacy Poster: BobMessina (wwwilmioid)

I'm trying to execute XSLT transformation on very large documents with Saxon transformer. The parser doesn't work correctly and returns "out of memory" and some other errors connected with the dimensions of documents. How can I solve these problems? Or, wich XSLT engine (in java environment) can I use to avoid these problems? Thanks.


Replies (3)

Please register to reply

RE: XSLT tranformation and large documents - Added by Anonymous over 19 years ago

Legacy ID: #2775922 Legacy Poster: Michael Kay (mhkay)

You don't say what you mean by "very large". I find that by allocating 256Mb of memory to the Java VM I can usually transform a 40Mb source document successfully. Check the description of the "java" command to see how to allocate heap memory: for example java -Xmx256M -xMs256M net.sf.saxon.Transform ... allocates an initial and maximum heap size of 256 Mbytes. Michael Kay

RE: XSLT tranformation and large documents - Added by Anonymous over 19 years ago

Legacy ID: #2776313 Legacy Poster: BobMessina (wwwilmioid)

Thank you for the advice. Now the transformer works correctly. But now I have another problem: Error reported by XML parser: reference to entity "&{0};" not defined. In the source document there are many entites (like Ö) that the parser doesn't recognize. Why? The document is malformed? Can I configure the parser to ignore unknown entities?

RE: XSLT tranformation and large documents - Added by Anonymous over 19 years ago

Legacy ID: #2776403 Legacy Poster: Michael Kay (mhkay)

&{0} is not well-formed XML. You have to get the input well-formed before you can transform it. The XML spec is slightly more open about Ö, in that it allows XML parsers to carry on when they find references to undefined entities, but XSLT is stricter: all entity references have to be resolved. Looks as if you have to do some data cleansing, or some debugging of the software that generated this (so-called) XML, before you can transform it. Michael Kay

    (1-3/3)

    Please register to reply