- From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
- Date: Tue, 10 Oct 2000 17:22:51 -0600
- To: "Vun Kannon, David" <dvunkannon@kpmg.com>
- Cc: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
At 2000-10-10 10:13, Vun Kannon, David wrote: >Thank you. At first blush, the new proposal does satisfy my basic request. >I'm unsure how the union of types across different schemas will look, but I >have to admit to not having read the new spec carefully. I'm envisioning a >situation in which one schema defines >colorsA={red,yellow,green} >, a second schema defines >colorsB= first:colorsA union {pink,blue} >eventually, an instance of a third schema containing >attribute name="currentColor" type="schema2:colorsB" >has ><trafficLight currentColor="schema2:pink"/> Well, actually the value should be "pink" not "schema2:pink". >but if the color was green what is the attribute value? schema1:green or >schema2:green? The attribute value is "green". The attribute is identified as having the union type "schema2:colorsB", and the value is identified as being of member type "schema1:colorsA". >Have I created a union with the type or the set of values the type >aggregates? I hope that question makes sense. Unfortunately, no, at least not to me when expressed in those terms. So let me try it in my terms. For a union type U, with member types V and W (in that order), - the lexical space of U is the the union of the lexical space of V with the lexical space of W - the value space of U is the union of the value space of V with the value space of W If the lexical spaces of V and W overlap, then lexical forms in the intersection will be interpreted as belonging to the first member type (V); more generally, a value is interpreted as belonging to the first member type in the union for which it is a legal value. The corresponding values in the other types are effectively shadowed and inaccessible. (My earlier note said that xsi:type could be used to overcome this shadowing; I was wrong. This was discussed speculatively in the WG, but is not in the spec.) I hope this helps. -C. M. Sperberg-McQueen
Received on Tuesday, 10 October 2000 19:24:49 UTC