Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#762 Loop-lifting and assignable variables

v9.0
closed
Michael Kay
5
2012-10-08
2008-01-16
Michael Kay
No

The optimizer should not attempt loop-lifting on any expression that contains a reference to an assignable global variable (that is, a variable defined in XSLT with saxon:assignable="yes"). Loop-lifting typically occurs when an expression appears in a for-each loop or a predicate but has no dependency on the context node, or when it appears in the body of a "for" expression and has no dependency on the range variable; such an expression is evaluated outside the loop (or on the first time round the loop) to prevent repeated and redundant evaluation of the same expression.

The effect of doing loop-lifting on such an expression is that it can use the value of the global variable as it was before entry to the loop.

A patch is being raised in Subversion to prevent this happening. It affects modules VariableReference, StaticProperty, and PromotionOffer.

Discussion

  • Michael Kay
    Michael Kay
    2008-01-18

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.3