<?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>28894</bug_id>
          
          <creation_ts>2015-07-05 19:16:01 +0000</creation_ts>
          <short_desc>[xp3.1] Appendix I.1 - incompatibilities</short_desc>
          <delta_ts>2015-07-14 08:27:58 +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>Last Call drafts</version>
          <rep_platform>SGI</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>josh.spiegel</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>121600</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-05 19:16:01 +0000</bug_when>
    <thetext>This section contains the paragraph

If U is a union type with T as one of its members, and if E is an element with T as its type annotation, the expression ^ now returns true. In previous versions of XPath 3.1, it returned false.

Firstly, I think &quot;previous versions of XPath 3.1&quot; is intended to read &quot;XPath 3.0&quot;.

Secondly, there is no expression at [^]. 

I found a possible answer in bug #27779 comment 2, which suggests that the missing expression is 

(E instance of element(*, U))

But as far as I can see this expression is true in both versions.

Searching the history further led me to bug 11713, but I think that predates 3.0.

So after spending half an hour on this, I haven&apos;t been able to determine what incompatibility we were trying to identify here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121601</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-05 19:31:41 +0000</bug_when>
    <thetext>Found it (with the help of the CVS log).

The entry was added in response to

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

and the example expression should indeed be 

(E instance of element(*, U))

But the incompatibility is between XPath 2.0 and XPath 3.0, not between 3.0 and 3.1. Bug #27141 suggested adding this entry to the 3.0 spec, but it has only been added to 3.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122005</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-13 22:45:47 +0000</bug_when>
    <thetext>I&apos;m not sure how best to address this now.  We could put it in a NOTE in 3.1, we&apos;re not likely to republish XQuery 3.0 in the very near future so it is harder to change it there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122014</commentid>
    <comment_count>3</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-14 04:15:33 +0000</bug_when>
    <thetext>Does this work? (in &quot;Incompatibilities&quot;)

&quot;
If U is a union type with T as one of its members, and if E is an element with T as its type annotation, the expression E instance of element(*, U) returns true in both XPath 3.0 and 3.1. In XPath 2.0, it returns false.

Note:

This is not an incompatibility with XPath 3.0. It should be included in XPath 3.0 as an incompatibility with XPath 2.0 but it was discovered after publication.
&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122018</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-14 08:27:58 +0000</bug_when>
    <thetext>Looks good to me.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>