Bugzilla – Bug 22552
[XP3.0] subtype(A, B) and xs:error
Last modified: 2013-07-09 15:32:52 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.
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