- From: Xan Gregg <xan.gregg@jmp.com>
- Date: Thu, 30 Dec 2004 21:07:01 -0500
- To: xmlschema-dev@w3.org
- Cc: klaasd@uni-koblenz.de
The example is not valid. The enumeration needs to be done in a
separate step, as follows:
<xsd:simpleType name="s1">
<xsd:union memberTypes="xsd:integer xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="s2">
<xsd:restriction base="s1">
<xsd:enumeration value="10"/>
</xsd:restriction>
</xsd:simpleType>
Now it's more clear that the value space has only the integer 10, since
the lexical value "10" corresponds to the integer 10 in s1.
> But you can change the sequence of evaluation in an instance document
> with
> the attribute xsi:type.
If test is declared to have type s2, I would expect:
<test xsi:type="xs:integer">10</test> <!-- valid -->
<test xsi:type="xs:string">10</test> <!-- invalid -->
xan
Received on Friday, 31 December 2004 02:07:09 UTC