W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2004

Enumeration-facet of union-types

From: Klaas Dellschaft <klaasd@uni-koblenz.de>
Date: Tue, 23 Nov 2004 17:39:20 +0100
Message-ID: <007701c4d17a$fb6f30c0$92471a8d@MorningSun>
To: <xmlschema-dev@w3.org>


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"

 <xs:element name="test" type="st.unionType"/>

 <xs:simpleType name="st.unionType">
    <xs:union memberTypes="xs:string xs:integer"/>
   <xs:enumeration value="11"/>


In section 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"
   xsi:noNamespaceSchemaLocation="test.xsd" xsi:type="xs:integer">

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
Received on Wednesday, 24 November 2004 13:12:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:06 UTC