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 30302 - [XP31/XQ31] Ambiguity in type subsumption rules
Summary: [XP31/XQ31] Ambiguity in type subsumption rules
Status: NEW
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: 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: 2018-10-25 22:15 UTC by Michael Kay
Modified: 2018-10-25 22:15 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2018-10-25 22:15:06 UTC
The rules for the subtype() relation say

The judgement subtype(A, B) determines if the sequence type A is a subtype of the sequence type B. A can either be empty-sequence(), xs:error, or an ItemType, Ai, possibly followed by an occurrence indicator. 

(and then say the same for B)

It's not clear whether the second sentence should parse as

A is (a) one of (empty-sequence(), xs:error, or an ItemType, Ai), followed by (b) an optional occurrence indicator.

or as

A is one of (a) empty-sequence(), (b) xs:error, or (c) an ItemType Ai followed by an optional occurrence indicator.

Actually I think it's neither of these. I think xs:error is itself an ItemType, so it doesn't need to be listed; and it can be followed by an occurrence indicator, so the actual rule is

A is either (i) empty-sequence(), or (ii) an ItemType Ai followed by an optional occurrence indicator.