[Yanel-dev] Performance Tuning XSLT
Balz Schreier
balz.schreier at gmail.com
Tue May 10 09:36:56 CEST 2011
Hi,
I have searched for quite a while and didn't find concrete answers to my
simple question:
Which one of the options below is faster or is the XSLT compiler "smart"
enough so that both variants are the same at the end?
1) I have to read a property in an external XML:
<xsl:value-of select="document($path)//city"/>
Whenever I need the city, I use the expression above (let's say 100 times)
2) Instead of calling the document() 100 times, I store the XML node in a
variable:
<xsl:variable name="node" select="document($path)"/>
And then I use 100 times
<xsl:value-of select="$node//city"/>
Which one is faster, better, for which reasons?
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20110510/7bc8826c/attachment.html>
More information about the Yanel-development
mailing list