Re: Union example incorrect?

> 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?


I think you're right.  I don't know why that example uses the vacuous 
restrictions of the simple types instead of the types themselves.

xan

Received on Tuesday, 28 September 2004 00:46:54 UTC