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 22552 - [XP3.0] subtype(A, B) and xs:error
Summary: [XP3.0] subtype(A, B) and xs:error
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.0 (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: 2013-07-03 08:30 UTC by Michael Kay
Modified: 2013-07-09 15:32 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2013-07-03 08:30:37 UTC
Section 2.5.7 says that xs:error? and xs:error+ are "identical" to empty-sequence(). But the table in 2.5.6.1 gives different outcomes for subtype(xs:error?, X) and subtype(empty-sequence(), X). For example, it says that subtype(xs:error?, empty-sequence()) is false, while subtype(empty-sequence(), empty-sequence()) is true.

I think the answer to this problem is to define another row and column in the table labelled xs:error, and to state in an annotation to the table that xs:error+ is treated like xs:error, while xs:error? and xs:error* are treated like empty-sequence(). The entries in the new row and column are

subtype(xs:error, X) all rows true
subtype(X, xs:error) all rows false except subtype(xs:error, xs:error).

The existing exception in one cell of the table can then be removed.

Incidentally, we have now established that XSD 1.1 does not define a valid XML representation for union types with no members, so in practice we can treat xs:error as being the only such type.
Comment 1 Jonathan Robie 2013-07-09 15:32:52 UTC
The WG agrees with this proposal.

In addition, I was asked to add the following bullet point to 2.5.6.2, after the second bullet point:

Ai is xs:error and Bi is a generalized atomic type