I get a java.lang.OutOfMemoryError when I try to process multiple documents with the document() function. What can I do?
As a general rule, Xalan-Java currently caches all of the documents that you read in with the document() function during a transformation. If your objective is to transform a series of documents, you can break the process into a series of transformations. The PipeDocument extension element provides one strategy for batching a series of parallel transformations. Another alternative is to place your document() call in the select attribute of an xsl:for-each instruction element and use a custom PI (Processing Instruction) to turn off document caching. Include an XPath expression in your document() call if you do not need to process the entire document. Sample stylesheet fragment:
Related Questions
- What is the basic process of indexing and storing documents in VoiceCode Document Management, and where are these stored?
- Geomorph stops with an error when I try to open a new document, after having closed all the documents. What can be done?
- I get a java.lang.OutOfMemoryError when I try to process multiple documents with the document() function. What can I do?