W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2003

Enumeration component and restriction

From: Michael Marchegay <mmarcheg@optonline.net>
Date: Wed, 27 Aug 2003 10:30:11 +0200
Message-ID: <004301c36c75$a33c5740$0302a8c0@esteban>
To: <xmlschema-dev@w3.org>

Hi all,

I would like to have a clarification on the way to build the {value}
property of an enumeration component, and especially how those values are
conveyed accross restrictions.

For example, if a type (call it A) restricts a buil-in type by using several
<enumeration> information item in the XML representation, and if another
type (call it B) restricts A by specifying some of the <enumeration>
information item specified in A, what components are in the {facets} of A,
and what is its (their) value(s)?

<xs:simpleType name="A">
  <xs:restriction base="xs:token">
    <xs:enumeration value="x"/>
    <xs:enumeration value="y"/>
    <xs:enumeration value="z"/>

<xs:simpleType name="B">
  <xs:restriction base="A">
    <xs:enumeration value="y"/>

Does the {facets} property of B contain:
1 - One enumeration component whose {value} is {y}?
2 - One enumeration component whose {value} is {x, y, z}?
3 - Two enumeration components whose {value}s are {y} and {x, y, z}?

XML Schema part. 2 - makes me think that 3 would be the correct

And what for the following type?

<xs:simpleType name="C">
  <xs:restriction base="A"/>

Would it be one enumeration component with a {value} being {x, y, z}?

Received on Wednesday, 27 August 2003 04:32:14 UTC

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