You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Tobias Wahlström <to...@pricerunner.se> on 2000/08/03 13:52:59 UTC

Does Xalan optimize stylesheets?

Hello!

Assume the following template rule:

<xsl:template match="foo/bar">
  <foo><xsl:value-of select="gazonk"/></foo>
  <bar><xsl:value-of select="gazonk/@first"/></bar>
  <gazonk><xsl:value-of select="gazonk/@second"/></gazonk>
</xsl:template>

Does Xalan (for java particulary) optimize the rules so that the gazonk
element located by the first select is 'reused' for the two following
selects? That is would it be evaluated in the same way as the template rule:

<xsl:template match="foo/bar/gazonk">
  <foo><xsl:value-of select="."/></foo>
  <bar><xsl:value-of select="@first"/></bar>
  <gazonk><xsl:value-of select="@second"/></gazonk>
</xsl:template>


Regards,
Tobias Wahlström, Pricerunner.com