Project

Profile

Help

Bug #6473

closed

Expression `/[x]` is not accepted

Added by Michael Kay 6 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2024-07-07
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

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.


Related issues

Copied to SaxonJS - Bug #6516: Expression `/[x]` is not accepted ClosedDebbie Lockett2024-08-21

Actions
Actions #1

Updated by Michael Kay 5 months ago

  • Status changed from New to In Progress
  • Applies to branch 11, 12, trunk added
  • Platforms .NET, Java added

Test cases have been added to the QT4 test suite, test set prod-PathExpr.

Actions #2

Updated by Michael Kay 5 months ago

  • Status changed from In Progress to Resolved
  • Fix Committed on Branch 12, trunk added

Fixed on 12.x branch. Was already fixed on 13.x. Note that some of the new tests in prod-PathExpr for new XP40 features are not passed by Saxon 12.x, and we don't intend to change this (the spec is still moving).

Actions #3

Updated by Debbie Lockett 4 months ago

  • Copied to Bug #6516: Expression `/[x]` is not accepted added

Please register to edit this issue

Also available in: Atom PDF