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 30051 - "DirElemConstrutor" erroneously displayed in XPath 3.1 Proposed Rec 17.01.2017?
Summary: "DirElemConstrutor" erroneously displayed in XPath 3.1 Proposed Rec 17.01.2017?
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Proposed Recommendation
Hardware: All 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-01-20 16:30 UTC by Todd Ditchendorf
Modified: 2017-02-07 18:26 UTC (History)
3 users (show)

See Also:


Attachments

Description Todd Ditchendorf 2017-01-20 16:30:42 UTC
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.
Comment 1 Andrew Coleman 2017-02-06 09:01:54 UTC
ACTION-666-02 - Josh to address editorial bugs 30051, 30050