This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30175 - [XP31] Examples of "?" operator for maps and arrays
Summary: [XP31] Examples of "?" operator for maps and arrays
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Recommendation
Hardware: PC All
: P2 editorial
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-04 15:09 UTC by Andrew Coleman
Modified: 2017-12-13 09:06 UTC (History)
0 users

See Also:


Attachments

Description Andrew Coleman 2017-09-04 15:09:33 UTC
Comment from Martin Honnen <martin.honnen@gmx.de> on public-qt-comments@w3.org 
See https://lists.w3.org/Archives/Public/public-qt-comments/2017Jul/0038.html

The XPath 3.1 spec for the "?" lookup distinguishes between 
https://www.w3.org/TR/xpath-31/#id-unary-lookup and 
https://www.w3.org/TR/xpath-31/#id-postfix-lookup. The section about the 
unary lookup in the examples section gives some example which for me 
seem to examples of an unary lookup, but also three examples

- $m?*
- [1, 2, 5, 7]?*
- [[1, 2, 3], [4, 5, 6]]?*

which, for me, seem to be examples of the postfix lookup, as in

   $m?*

we have a variable reference followed by "?*", in

   [1, 2, 5, 7]?*

we have a 
https://www.w3.org/TR/xpath-31/#prod-xpath31-SquareArrayConstructor 
followed by "?*" and in the last example

   [[1, 2, 3], [4, 5, 6]]?*

there is a further square array constructor followed by "?*".

All these seem to originate from the grammar production

   [49] PostfixExpr ::= PrimaryExpr (Predicate | ArgumentList | Lookup)*	

Have I misread the grammar production rules or are the examples in the 
wrong section?
Comment 1 Andrew Coleman 2017-09-04 15:12:02 UTC
The Working Group agreed that this is an editorial bug and the proposed fix should be added to the XPath 3.1 errata document.
Comment 2 Andrew Coleman 2017-12-13 09:06:29 UTC
This has been resolved in the errata document:
https://www.w3.org/XML/2017/qt-errata/xpath-31-errata.html#E4