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 27779 - [XQ 3.1] Undocumented incompatibility: version declaration
Summary: [XQ 3.1] Undocumented incompatibility: version declaration
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC 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-01-07 13:21 UTC by Michael Kay
Modified: 2015-07-06 09:16 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2015-01-07 13:21:30 UTC
Section J.1 is intended to list incompatibilities introduced by 3.1, that is, constructs that are accepted in XQuery 3.0 but have a different effect under a 3.1 processor.

There is an incompatibility not included in the list. If a query contains the version declaration 

xquery version "3.0"

then an XQuery 3.1 processor is entitled to reject it with error XQST0031.

We might like to reconsider whether we really want to have this unnecessary incompatibility in our spec, but at the very least we should document its existence.

Note that this incompatibility affects a number of test cases, which should either have the version declaration removed, or should permit an alternative result of XQST0031 if run under a 3.1 processor.
Comment 1 Michael Kay 2015-01-13 17:29:26 UTC
There's another problem in J.1. It says

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 XQuery 3.1, it returned false.

What is "the expression"?
Comment 2 Michael Kay 2015-01-13 17:33:16 UTC
I think the answer to the question in comment 1 is:

(E instance of element(*, U))
Comment 3 Andrew Coleman 2015-01-31 16:11:07 UTC
At the telecon on 2015-01-27, the working group decided to adopt the following wording as the resolution to this bug...

[[
An XQuery version number consists of two integers separated by a dot. The first integer is referred to as the major version number; the second as the minor number.
  
Any XQuery processor that implements any version of XQuery with a given major number MUST accept any query with the same major version number. The processor MAY reject
queries labeled with a different major version number. The processor MAY reject queries with the same major version number and a greater minor version number than the processor recognizes.

In all cases if a query is rejected because of a verison mismatch with the processor, error XQST0031 MUST be raised.

Note:
  The processor MAY have an option to require that minor versions also match, or that the minor number of the version in the query is not larger than the largest minor version understood by the processor in this major release of XQuery, or to allow more permissve version matching, perhaps with warnings, but the behaviour is then outside the scope of this specification.

]]
Comment 4 Michael Kay 2015-07-06 09:16:59 UTC
Confirmed that the agreed change appears in the current draft.