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

Enumeration facet - List Datatype

From: Elena Litani <hlitani@jtcsv.com>
Date: Wed, 06 Dec 2000 15:57:56 -0500
Message-ID: <3A2EA854.3C11FC5B@jtcsv.com>
To: xmlschema-dev@w3.org
Hi,
I am confused about enumeration facet on list datatype.

Which case is correct?
(1) The enumeration is a constraint on the list 
OR 
(2) The enumeration is constraint on elements of the list.


For example, lets say I have the following schema:
<?xml version="1.0" encoding="UTF-8"?>
<schema>
<element name ="myInt" type="myType"/>
<simpleType name="myList">  
	<list itemType="integer"/>
</simpleType>

<simpleType name="myType">
 <restriction base="myList">
    <enumeration value="1"/>
    <enumeration value="2"/>
  </restriction>
</simpleType>
</schema>   

In the corresponding, xml document:

<myInt>1 2</myInt>

would it be Valid or Invalid?


Thank you,
Elena
Received on Wednesday, 6 December 2000 15:57:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT