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
I am confused about enumeration facet on list datatype.

Which case is correct?
(1) The enumeration is a constraint on the list 
(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"?>
<element name ="myInt" type="myType"/>
<simpleType name="myList">  
	<list itemType="integer"/>

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

In the corresponding, xml document:

<myInt>1 2</myInt>

would it be Valid or Invalid?

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:48 UTC