[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Java Extension Functions and XT
> So if I understand correctly, when I used <xsl:variable > name="seed"><xsl:value-of > select="string(logon:seed())"/></xsl:variable> I > created a text macro that was then evaluated on each use. Repeatedly > inserting and evaluating a text macro caused the function to be called > repeatedly which in my case caused the value to change. > What the spec says is that this creates a "result tree fragment". It doesn't say whether it creates it once or whether it does it repeatedly each time the variable is used. From your evidence xt is doing it repeatedly. SAXON only does it once, when the variable is declared. I believe that both behaviours are strictly correct according to the spec. It would also be correct to evaluate the function repeatedly when you use the "select" syntax, since there is nothing in the spec to say that a variable should not be re-evaluated each time it's used. I think it would be useful if the spec said something about whether or not extension functions can have side-effects and what to expect if they do. It's not something the implementor can enforce, of course. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|