- From: <bugzilla@jessica.w3.org>
- Date: Mon, 15 Oct 2012 10:03:57 +0000
- To: public-qt-comments@w3.org
- Message-ID: <bug-19504-523-1QH2wXfyXa@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19504 --- Comment #10 from Michael Kay <mike@saxonica.com> --- OK, I agree the case of union(A,B) <: union(A,B,C,D) is different from the other cases I mentioned, because after validating an instance against these two types, the instance carries no record of which of the two types was used for validation. Although the only place we use subtyping judgements in the standard (namely for higher-order functions) isn't important enough to justify special treatment of this case, I can see that an implementation wanting to use the same judgements for static type checking would want to "get this right", and it's reasonable to want to use the same rules for both cases. I don't think any harm is done if we change our rules to handle this case, other than the slight additional complexity introduced to the specification by virtue of the fact that we no longer simply defer to the substitutability rules given in XSD. There's another point which occurs to me suggesting that we need to make this change: namely that in XSD, if a type U is defined as union(union(A,B), union(C,D)), then union(A,B) and union(C,D) are substitutable for U, while union(A,C) is not. So in this situation an element E of type union(A,B) can appear in the substitution group of an element H of type union(A,B,C,D), which means that we must accept it. We aren't obliged to accept union(A,C) but it does no harm if we do. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Monday, 15 October 2012 10:03:59 UTC