[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: null call of document function
> 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|