This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RE: Variable: true or false


Hi David,

> Of course this only matters because xsl:message is unique in XSL of
> having a side effect (making a message) so by putting xsl:message
> inside variables like that, you get to find out when and how often a
> processor (re-)evaluates a variable binding.

And it's not only the side effect of sending a message to stderr
that's an issue, it's the fact that the terminate attribute can
actually stop the transformation at that point, which makes it fairly
important.

There are places in XSLT that specify whether a particular part of the
code is evaluated or not (like the content of an xsl:when, which is
useful/important when you have extension functions). Just it doesn't
seem that the setting of a variable-binding element is one of them.

It looks like right now a variable's content is evaluated when it's
bound rather than when it's used. Surely this will become an issue
when/if processors start optimising (so that variable values are only
evaluated if they're used) or using parallel processing?

Lawks.

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]