<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>30051</bug_id>
          
          <creation_ts>2017-01-20 16:30:42 +0000</creation_ts>
          <short_desc>&quot;DirElemConstrutor&quot; erroneously displayed in XPath 3.1 Proposed Rec 17.01.2017?</short_desc>
          <delta_ts>2017-02-07 18:26:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XPath 3.1</component>
          <version>Proposed Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Todd Ditchendorf">todd.ditchendorf</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>andrew_coleman</cc>
    
    <cc>josh.spiegel</cc>
    
    <cc>todd.ditchendorf</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128403</commentid>
    <comment_count>0</comment_count>
    <who name="Todd Ditchendorf">todd.ditchendorf</who>
    <bug_when>2017-01-20 16:30:42 +0000</bug_when>
    <thetext>In section &quot;3.11.3 The Lookup Operator (&quot;?&quot;) for Maps and Arrays&quot; (https://www.w3.org/TR/2017/PR-xpath-31-20170117/#id-lookup), there is a list of &quot;Examples&quot; explaining use of the Lookup Operator which includes the following item:

&gt; • If the context item is an array, let $x:= &lt;node i=&quot;3&quot;/&gt; return ?($x/@i) does not raise a type error because the attribute is untyped. But let $x:= &lt;node i=&quot;3&quot;/&gt; return ?($x/@i+1) does raise a type error because the + operator with an untyped operand returns a double.

This example contains two &quot;Direct Element Constructors&quot; or &quot;DirElemConstrutor&quot;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 &quot;Direct Element Constructors&quot; 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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128437</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2017-02-06 09:01:54 +0000</bug_when>
    <thetext>ACTION-666-02 - Josh to address editorial bugs 30051, 30050</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>