This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In section "3.11.3 The Lookup Operator ("?") for Maps and Arrays" (https://www.w3.org/TR/2017/PR-xpath-31-20170117/#id-lookup), there is a list of "Examples" explaining use of the Lookup Operator which includes the following item: > • If the context item is an array, let $x:= <node i="3"/> return ?($x/@i) does not raise a type error because the attribute is untyped. But let $x:= <node i="3"/> return ?($x/@i+1) does raise a type error because the + operator with an untyped operand returns a double. This example contains two "Direct Element Constructors" or "DirElemConstrutor"s that seem to come from the XQuery specification (https://www.w3.org/TR/xquery-31/#doc-xquery31-DirElemConstructor). Since XPath 3.1 does not contain DirElemConstrutors (but XQuery 3.1 does), is this example really meant to appear in the XPath 3.1 Rec? BACKGROUND ======== I came upon this apparent issue as I was browsing the XPath 3.1 Proposed Rec to learn about the new JSON support in XPath. I saw the above example, and momentarily thought that "Direct Element Constructors" had been added to XPath as well. That surprised and confused me for a while, until I dug thru the XPath 3.1 EBNF and couldn't find any trace of DirElemConstrutors there. So then I went to the XQuery 3.1 EBNF to compare, and *did* find DirElemConstrutors there. Anyhow, maybe I'm being overly picky, but I feel like the above-cited example should perhaps not appear in the XPath 3.1 Rec, since DirElemConstrutors are not allowed in XPath. I found it confusing, and suspect others might too.
ACTION-666-02 - Josh to address editorial bugs 30051, 30050