Altova Mailing List Archives

[xsl] why exsl:node-set() is so slow

From: David Tolpin <dvd@-------------->
Date: 1/16/2004 7:52:00 AM

I wrote a chain of 4 stylesheets; the chain takes an XML file an produces
another one through 4 transformations. It is reasonaly fast, with an XSLT processor
invoked from the command-line for each step (a shell script aids in it).

Recently, I discovered exsl:node-set(), the function that takes the result of
one transformation and converts it to a node set, so that the transformations
can be chained within one invocation of the transformation engine, not stepwise.

I have gladly re-implemented the chain with use exsl:node-set() in hope that
time spent on the slow start-up of Java Machine will be saved. However, all
XSLT engines I have tested  have given me considerable lower performance than
with four invocation, 3 to 5 times slower. What's wrong with exsl:node-set()?

SAXON, for example, takes 150 seconds instead of apprx 50 to process the same
data with calls to exsl:node-set() instead of command-line invocations of the
same processor for each of the four steps. jd.xslt is even slower.

The only notorious exception is xsltrpoc. It is much faster with exsl:node-set()
than without. The only drawback is that xsltproc produces absolutely wrong and
unusable result when exsl:node-set() is employed.

What's wrong with exsl:node-set()? 

David Tolpin
PS: the stylesheets are at

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.