Union example incorrect?

Hi,
I was looking at XMLSchema Part 2: Datatypes, section 2.5.1.3(Union datatypes, http://www.w3.org/TR/xmlschema-2/#union-datatypes), second example.
It seems to me that the part
    xsi:type="xsd:string"
should be invalid as per [1] because "xsd:string" is not validly derived from the anonymous union type according to the rules in [2]. I understand that [2], rule 2.2.4, specifies that in the case of an union type B, a type D can be validly derived from B if validly derived from any of the members of the union, but in this case it's the other way around, the union members are validly derived from "xsd:string".
Is this example in error or is there something that I'm missing?

Thanks,
Radu

[1] http://www.w3.org/TR/xmlschema-1/#cvc-elt
[2] http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok

Received on Tuesday, 28 September 2004 00:17:20 UTC