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)?

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

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

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 - 4.3.5.3 makes me think that 3 would be the correct
answer...

And what for the following type?

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

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

Michael
Received on Wednesday, 27 August 2003 04:32:14 GMT

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