This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Imagine a schema defining my:sizeType <xs:simpleType name="sizeType"> <xs:union memberType="xs:integer xs:string"/> </xs:simpleType> The various specifications seem to suggest such a constructor exists (5.4) but do not appear to be clear as to what the behaviour of a constructor for such a union type should be. So for example, should my:sizeType("123") instance of xs:integer return true, false, or throw an exception (for the constructor being invalid - if so which?). Our thoughts are that the behaviour should be the same as during schema validation (so should map to an xs:integer and hence return true), but are unable to find anything definite in the specification to confirm this.
(Personal response) Section 5.4 starts: "For every atomic type in the static context that is derived from a primitive type, there is a constructor function..." A union type is not an atomic type; I think it is quite clear that constructor functions are not defined for list and union types. It would be nice if they were, but currently they are not.
OK. That makes sense. (We were getting confused as were reading "For every atomic type" as "Any type which is a subtype of xs:anyAtomicType", which the union types are, but clearly isn't what is actually being described in 5.4)