[Bug 30051] New: "DirElemConstrutor" erroneously displayed in XPath 3.1 Proposed Rec 17.01.2017?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=30051

            Bug ID: 30051
           Summary: "DirElemConstrutor" erroneously displayed in XPath 3.1
                    Proposed Rec 17.01.2017?
           Product: XPath / XQuery / XSLT
           Version: Proposed Recommendation
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: todd.ditchendorf@gmail.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 20 January 2017 16:30:49 UTC