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

Enumeration restrictions

From: Gregory M. Messner <gmessner@breezefactor.com>
Date: Fri, 20 Dec 2002 08:46:57 -0800
Message-ID: <B181E96D7A30D411A12600A0CCE475DE0F93D2@breezefactor.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>


Is it legal to define a restriction with enumeration and then extend with a
restriction that contains enumerations that are not in the base restriction?


base type:

<xs:simpleType name="baseType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="AccountNumber"/>
    <xs:enumeration value="BillOfLadingNumber"/>
    <xs:enumeration value="BuyerClaimNumber"/>
    <xs:enumeration value="Other"/>
  </xs:restriction>
</xs:simpleType>


extension:

<xs:attribute name="UsageType">
  <xs:simpleType>
    <xs:restriction base="baseType">
      <xs:enumeration value="Other"/>
	<xs:enumeration value="Contract"/>       <!-- Not in baseType -->
	<xs:enumeration value="ContractNumber"/> <!-- Not in baseType -->
    </xs:restriction>
  </xs:simpleType>
</xs:attribute>
		
Received on Friday, 20 December 2002 11:42:17 GMT

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