[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
Handling the enumeration facet

Hi,

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:simpleType>
    <xs:restriction>
        <xs:union memberTypes="xs:integer xs:string"/>
        <xs:enumeration value="10"/>
    </xs:restriction>
</xs:simpleType>


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
Klaas 
Received on Wednesday, 29 December 2004 18:33:06 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.