W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2017

[XPath31]Question about examples of "?" operator for maps and arrays

From: Martin Honnen <martin.honnen@gmx.de>
Date: Tue, 18 Jul 2017 12:47:14 +0200
To: public-qt-comments@w3.org
Message-ID: <a0406f0b-7703-8505-3fed-f2a345d48dea@gmx.de>

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?
Received on Tuesday, 18 July 2017 10:47:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 18 July 2017 10:47:47 UTC