<xsl:with-param name="arg1" select="substring(.,2)"/>

In this case, you're using the value directly, which should work pretty
efficiently.

         <xsl:with-param name="arg1">
           <xsl:value-of select="substring(.,2)"/>
         </xsl:with-param>

In this case you have requested whitespace (line breaks and indentation)
around the value-of's result. This means XSLT has to create the
concatenated data. I'm not sure how Xalan-C s handling that, but in Xalan-J
you might also be creating a Result Tree Fragment to contain the result of
that computation (if so, that's an opportunity for optimization). Either
way, there is going to be some additional heap churn.

As an experiment, you might want to try eliminating the whitespace:

         <xsl:with-param name="arg1"><xsl:value-of select="substring
(.,2)"/></xsl:with-param>

and see whether Xalan-C is clever enough to recognize this as equivalent to
the first version.


Reply via email to