Enumeration component and restriction

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 UTC