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

Close

#1002 Bad optimization for X[position() = N to last()]

v9.2
closed
Michael Kay
5
2012-10-08
2009-11-04
Michael Kay
No

Saxon incorrectly optimizes the expression X[position() = N to last()], or more generally, any expression of the form X[position() = N to M] where N or M depend on the focus. The effect is that N and M are evaluated with respect to the focus that applies outside the predicate.

A patch is being committed to Subversion for the 9.1 and 9.2 branches. Affects module FilterExpression.java, around line 595. A test case last-23 is being added to the W3C XQuery test suite.

Discussion

  • Michael Kay
    Michael Kay
    2010-01-27

    Fixed in 9.2.0.5