Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - AW: Validation problem with user-defined derived complex types [Thread Next] Enumeration-facet of union-typesTo: <xmlschema-dev@--.---> Date: 11/23/2004 6:39:00 PM
Hi,
I have a question about enumeration facets of union types. I have the
following schema:
----------------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="test" type="st.unionType"/>
<xs:simpleType name="st.unionType">
<xs:restriction>
<xs:simpleType>
<xs:union memberTypes="xs:string xs:integer"/>
</xs:simpleType>
<xs:enumeration value="11"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
----------------------------------
In section 2.5.1.3 of "XML Schema Part2: Datatypes"
(http://www.w3.org/TR/xmlschema-2/#union-datatypes) it is said that the
evaluation order of datatypes can be overridden with the use of xsi:type.
So my question is whether the value space of "st.unionType" only contains
the String "11" or also the Integer "11". An example for the problem would
be the following xml file:
----------------------------------
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="test.xsd" xsi:type="xs:integer">
11
</test>
----------------------------------
Is this file valid or should it be rejected? My problem is that I have two
tools which interpret the enumeration-facet of union types in different ways
and now I have to decide where to report the bug ;-)
Thanks for your help
Klaas Dellschaft
From nobody@w... Thu Nov 25 23:37:02 2004
Received: from wiggum.w3.org ([128.30.52.23])
by frink.w | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
