Bug #6516
closedExpression `/[x]` is not accepted
100%
Description
This bug #6473 reported against Saxon (2024-07-07), is also a bug in SaxonJS:
The expression
/[x,y]
is apparently legal in XPath 3.1 -- it should be interpreted as the path/
(selecting the root node) followed by an array constructor evaluated with that root node as the context item. (One might imagine an alternative interpretation in which[x,y]
is interpreted as a predicate filter, but that doesn't parse.)Saxon rejects this expression with a syntax error.
The expression
/map{a:2}
also appears to be legal, and is also rejected by Saxon.
The new QT3 tests in prod-PathExpr
added for this bug (PathExpr-17 PathExpr-18 PathExpr-19) fail with SaxonJS.
Related issues
Updated by Debbie Lockett 4 months ago
- Copied from Bug #6473: Expression `/[x]` is not accepted added
Updated by Debbie Lockett 4 months ago
- Status changed from New to Resolved
- Assignee set to Debbie Lockett
- Fix Committed on JS Branch 2, Trunk added
Fix for #6473 in XPathParser.java copied over to parseFast.js (SaxonJS XPath parser).
Updated by Debbie Lockett about 2 months ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to SaxonJS 2.7
Bug fix applied in the SaxonJS 2.7 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page