W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2012

[Bug 19504] [QT3TS] instanceof139

From: <bugzilla@jessica.w3.org>
Date: Fri, 12 Oct 2012 21:01:04 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-19504-523-Wo8levZ8mb@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19504

--- Comment #6 from Michael Kay <mike@saxonica.com> ---
There are plenty of other cases where the extent of a type P is clearly a
subset of the extent of another type S, but P is not substitutable for S. For
example, the pair (P=xs:unsignedByte, S=xs:int), or the pair
(P=string(length<5), S=string(length<10)) Agreed, this situation is undesirable
(and in the case of the integer subtypes, makes them fairly unusable), but it's
a consequence of the original decision to go with "named typing" and I think we
have to live with it.

In fact, as XSD 1.1 part 2 notes (in section 3.16.6.3 Type Derivation OK
(Simple)), the fact that A is substitutable for union(A, B, C) is a little
anomalous; it's a rare concession towards structural rather than named typing.

I'm not sure that anything would break if we recognized union(A,B) as a subtype
of union(A,B,C). I think we have to recognize subtype relationships that XSD
recognizes, but the converse is not necessary. But it would certainly create an
unnecessary incompatibility.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 12 October 2012 21:01:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 12 October 2012 21:01:06 GMT