Expression 'position() eq last()' wrongly evaluated inside an xsl:result-document instruction
When an expression 'position() eq last()' (or similarly 'position() ne last()') is used inside the body of an xsl:result-document instruction (for example as the select attribute of an xsl:value-of), but the context for these functions is outside the instruction, the wrong results are produced.
Bug found when running the 9.7 development branch, but also appears to be a bug in 9.5 and 9.6.
#1 Updated by Debbie Lockett over 6 years ago
- Status changed from New to In Progress
- Assignee set to Debbie Lockett
Fix: implemented hasNext() method on ManualIterator (the method previously always returned false). So that the IsLastExpression evaluates correctly in the case that the current iterator is a ManualIterator (for instance when processing an xsl:result-document instruction).
Patch applied on 9.5, 9.6, and development 9.7 branches.
Test to be added to the XSLT 3.0 test suite.
Please register to edit this issue