Bug #3758
closedSaxon 9.8 position()'s "context" regression
100%
Description
When using XPath 2.0 if and satisfies structures in conjunction with position() my stylesheet generates different output in PE 9.7.0.21 and HE 9.8.0.8.
The position() might operate in a different context in 9.8.
Sorry, if this change relates to the XSLT/XPath 3.0 implementation.
Files
Updated by Michael Kay over 6 years ago
- Category set to Internals
- Status changed from New to In Progress
- Assignee set to Michael Kay
- Priority changed from Low to Normal
Thanks for reporting it.
It appears to be a problem with the new code for loop-lifting optimizations that was introduced in Saxon 9.8. The expression "position() = 1" is being lifted out of the "some ... satisfies ..." loop, meaning that it is only evaluated once on the first iteration of the loop. But this involves saving the dynamic context of the expression, and the code for saving the dynamic context is not written to handle expressions that depend on the value of position() or last().
Updated by Michael Kay over 6 years ago
- Status changed from In Progress to Resolved
- Applies to branch trunk added
- Fix Committed on Branch 9.8, trunk added
Changed expression.isLiftable() to return false if the expression depends on position() or last().
Added W3C test case position-8301.
Updated by O'Neil Delpratt over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.12 added
Bug fix applied in the Saxon 9.8.0.12 maintenance release.
Please register to edit this issue