Bug #5369
closedIn complex XSLT patterns, the "child-or-top" logic for parentless elements is not implemented
100%
Description
Illustrated by new test case match-274.
In cases where a pattern has to be evaluated "the hard way" (using the logic described in the spec, rather than the right-to-left optimised evaluation) we aren't implementing the rule in the spec that an initial X step in the pattern matches child-or-top::X
rather than child::X
- that is, it should match an X element whether or not it has a parent.
Applies also to SaxonJS
Updated by Michael Kay almost 3 years ago
- Status changed from New to In Progress
Changed GeneralNodePattern
so this test case now passes.
The logic is that when the search of the ancestor axis hits the root without finding a match, then if (a) the top-most node found was a parentless element, comment, text, or PI node, and (b) the "equivalent expression" starts with a child step, then the pattern matches provided (c) the node-test of the first step in the pattern matches the top-most element of the tree, and (d) the "rump" of the equivalent expression (that is, the expression minus its first step) selects the node being tested against the pattern.
Updated by Michael Kay almost 3 years ago
- Status changed from In Progress to Resolved
- Applies to branch 10, 11, trunk added
- Fix Committed on Branch 10, 11, trunk added
Updated by O'Neil Delpratt over 2 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 10.8 added
Bug fix applied in the Saxon 10.8 maintenance release. (Leaving open awaiting Saxon 11 maintenance release.)
Updated by O'Neil Delpratt over 2 years ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 11.3 added
- Fixed in Maintenance Release deleted (
10.8)
Bug fix applied in the Saxon 11.3 maintenance release.
Updated by O'Neil Delpratt over 2 years ago
- Fixed in Maintenance Release 10.8 added
Please register to edit this issue