Project

Profile

Help

Bug #6516

closed

Expression `/[x]` is not accepted

Added by Debbie Lockett about 2 months ago. Updated about 16 hours ago.

Status:
Closed
Priority:
Normal
Category:
XPath Conformance
Sprint/Milestone:
-
Start date:
2024-08-21
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

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

Copied from Saxon - Bug #6473: Expression `/[x]` is not accepted ResolvedMichael Kay2024-07-07

Actions
Actions #1

Updated by Debbie Lockett about 2 months ago

  • Copied from Bug #6473: Expression `/[x]` is not accepted added
Actions #2

Updated by Debbie Lockett about 2 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).

Actions #3

Updated by Debbie Lockett about 16 hours 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