Bug #4629
closedFailure in key() function (originally from David Carlisle's HTML parser)
100%
Updated by Michael Kay over 4 years ago
Confirmed that the problem occurs using either compiler to compile the stylesheet.
Updated by Michael Kay over 4 years ago
The problem appears to be that the value of regex-group() does not survive the creation of a new dynamic context by the "/" operator.
The code for the slash operator (Expr.forEach) does
const c2 = context.newContext(false);
c2.focus = Iter.Tracker(arg(context));
but the regex groups are held in c2.focus.regexGroups, which is not preserved by these instructions.
Updated by Michael Kay over 4 years ago
I think it's wrong that regexGroups
should be a property of context.focus
, rather than context
itself, so I'm seeing what happens if we change this.
Updated by Michael Kay over 4 years ago
This change fixes the problem, but it needs to be regression-tested.
Updated by Michael Kay over 4 years ago
Regression testing revealed the need to reset regex-groups when evaluating user functions and patterns. The change now seems OK.
It would be useful to add a test to XSLT3 to catch this condition.
Updated by Michael Kay over 4 years ago
- Status changed from New to Resolved
- Applies to JS Branch 2.0 added
- Fix Committed on JS Branch 2.0 added
Added test case analyze-string-100
Updated by Community Admin almost 4 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0)
Updated by Community Admin almost 4 years ago
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
2.0)
Updated by Debbie Lockett over 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page