Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I get a java.lang.OutOfMemoryError when I try to process multiple documents with the document() function. What can I do?

0
Posted

I get a java.lang.OutOfMemoryError when I try to process multiple documents with the document() function. What can I do?

0

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: PIs do not ordinarily uses namespaces, so “xalan:” is a ‘fake’ namespace we have included to indicate that this is not a standard PI. If you include an

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123