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

Handling the enumeration facet

From: Klaas Dellschaft <klaasd@uni-koblenz.de>
Date: Wed, 29 Dec 2004 19:33:01 +0100
Message-ID: <003501c4edd4$d5174c20$c301a8c0@MorningSun>
To: <xmlschema-dev@w3.org>


in "XML Schema Part 2: Datatypes" it is said that an enumeration constrains 
the value space to a specified set of values. The information item contains 
a set of values from the value space. This is an important difference to the 
pattern facet which constrains the lexical space (and hence only indirectly 
the value space).

But the problem is that the schema component of an enumeration facet can 
only contain the literal of a value. This problem becomes obvious if the 
value space of a union type is constrained by an enumeration. Given the 
following type:

        <xs:union memberTypes="xs:integer xs:string"/>
        <xs:enumeration value="10"/>

Is the literal "10" only mapped to the number 10 or also to the string "10"? 
I couldn't find a corresponding section in the specs that unambigously 
handle this case. Do you know any sections that could help me to solve this 
problem? How would you translate the literal into its value?

Thanks in advance
Received on Wednesday, 29 December 2004 18:33:06 UTC

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