Could you elaborate on the phrase "optimize away"? I
understood it all up until there.
If you write an expression and the result isn't used, the XSLT processor is
likely to generate code that doesn't actually evaluate the expression:
that's what I mean by optimizing it away. The same effect can occur at
run-time. For example, if you write
<xsl:if test="doc('a.xml') | doc('b.xml')">
then the xsl:if is testing whether the union of the two calls on doc() is
non-empty. There's a very good chance that the XSLT processor will evaluate
the first call, and if the result is non-empty it will decide that the test
is true and won't bother evaluating the second call on doc(). Which means
that if you're relying on side-effects caused by this call, you're going to
be disappointed.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--