W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

How to expand an enumeration list

From: Ian Stokes-Rees <ijs@decisionsoft.com>
Date: Tue, 15 May 2001 16:22:44 +0100
Message-ID: <3B0149C4.E35633B3@decisionsoft.com>
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
I would like to do something like:

  <xsd:simpleType name="aFewEnums">
    <xsd:restriction base="xsd:string" >
          <xsd:enumeration value="A"/>
          <xsd:enumeration value="B"/>
          <xsd:enumeration value="C"/>
  <xsd:simpleType name="aFewMoreEnums">
    <xsd:extension base="aFewEnums" >
          <xsd:enumeration value="D"/>
          <xsd:enumeration value="E"/>
          <xsd:enumeration value="F"/>

But obviously the syntax of "extension" doesn't allow this.  How would
I do this so that "aFewMoreEnums" would allow any of the set
{A,B,C,D,E,F}, but in such a way that it allows everything in the set
of "aFewEnums" plus {D,E,F}?


Ian Stokes-Rees                       DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com
Received on Tuesday, 15 May 2001 11:22:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC