Subject: Re: [xsl] XPath predicate in with-param's select From: "Felix Geller" <fgeller@xxxxxxxxx> Date: Mon, 17 Dec 2007 16:14:06 +0100 |
On Dec 17, 2007 3:48 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote: > > I also tried SaxonB for Java, but I don't get the current > > version of my stylesheet (without the predicate) to run on my > > XML document. It fails with an OutOfMemoryError, also when > > upping the VM's maximum by -Xmx512000000. > > I can't really follow the logic of what you are doing, but it's failed > creating temporary trees that don't need to be created. Using XSLT 2.0 > constructs (sequences and functions rather than trees and templates) is a > lot more efficient for this kind of thing. This would also allow you to > declare the types of your parameters and results which would make the code > much easier to understand. I haven't used XSLT 2.0 and am new to 1.0 as you might guess. But if it is worth the time, I will glady try to rewrite the functionality in XSLT 2.0. > I'm confused as to why you're passing a $node parameter to the template > part_a when the parameter isn't used by that template... Well, the current "helping function" is not what I want to do ultimately. It is merely a counter at the moment, but I'd like to mimic the behavior of a fold more closely and use a node for the computation in the helper function. I tried to write this step by step, and the last one was to add the passing of the node. Does it make more sense this way? Sorry if it is confusing. Saxon processes the current stylesheet (with the node passing) in about 8 seconds (9.5s) if I up the maximum memory again. (Output at the end: Memory used: 629056248) But I'm not so sure why it'd use so much memory, the input XML document has about 48mb. ~felix > Michael Kay > http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XPath predicate in with-p, Michael Kay | Thread | RE: [xsl] XPath predicate in with-p, Michael Kay |
RE: [xsl] XPath predicate in with-p, Michael Kay | Date | RE: [xsl] XPath predicate in with-p, Michael Kay |
Month |