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 28894 - [xp3.1] Appendix I.1 - incompatibilities
Summary: [xp3.1] Appendix I.1 - incompatibilities
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Last Call drafts
Hardware: SGI All
: P2 normal
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: 2015-07-05 19:16 UTC by Michael Kay
Modified: 2015-07-14 08:27 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2015-07-05 19:16:01 UTC
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 "previous versions of XPath 3.1" is intended to read "XPath 3.0".

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't been able to determine what incompatibility we were trying to identify here.
Comment 1 Michael Kay 2015-07-05 19:31:41 UTC
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.
Comment 2 Jonathan Robie 2015-07-13 22:45:47 UTC
I'm not sure how best to address this now.  We could put it in a NOTE in 3.1, we're not likely to republish XQuery 3.0 in the very near future so it is harder to change it there.
Comment 3 Josh Spiegel 2015-07-14 04:15:33 UTC
Does this work? (in "Incompatibilities")

"
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.
"
Comment 4 Michael Kay 2015-07-14 08:27:58 UTC
Looks good to me.