Re: [xsl] Does <xsl:copy> use a lot of memory? Is there an alternative that is more efficient?

Subject: Re: [xsl] Does <xsl:copy> use a lot of memory? Is there an alternative that is more efficient?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sun, 02 Sep 2012 15:08:04 +0200
Costello, Roger L. wrote:

However, such is not the case. I am dealing with an XML document that is 370 MB in size and has tens of thousands of references. And I have to repeat the embedding process multiple times.

Saxon gives me an "out of memory error."

I suspect the reason for this is due to the <xsl:copy> command. I believe it is making new copies, thereby consuming lots of memory. True?

So, is there an alternative to <xsl:copy> that is more efficient?

Is there a way to express the above template rule that is more efficient?

Well with an input tree for the rather large input document and an even larger result tree that task consumes a lot of memory.
Are you using the Java version of Saxon and have you simply tried to instruct the Java JRE to allocate more memory? See the Xmsn and Xmxn command line options of java.exe http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.html#options.






--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread