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

RE: How to expand an enumeration list

From: David E. Cleary <davec@progress.com>
Date: Tue, 15 May 2001 11:46:31 -0400
To: "Ian Stokes-Rees" <ijs@decisionsoft.com>, <xmlschema-dev@w3.org>
Message-ID: <NDBBIOBPAGDGFJAHFCGGKEOPCGAA.davec@progress.com>
Use a union of two enumerations.

Dave

> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]On Behalf Of Ian Stokes-Rees
> Sent: Tuesday, May 15, 2001 11:23 AM
> To: xmlschema-dev@w3.org
> Subject: How to expand an enumeration list
> 
> 
> 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:restriction>
>   </xsd:simpleType>
>  
>   <xsd:simpleType name="aFewMoreEnums">
>     <xsd:extension base="aFewEnums" >
>           <xsd:enumeration value="D"/>
>           <xsd:enumeration value="E"/>
>           <xsd:enumeration value="F"/>
>     </xsd:extension>
>   </xsd:simpleType>
> 
> 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}?
> 
> Cheers,
> 
> Ian.                                                             
> -- 
> Ian Stokes-Rees                       DecisionSoft Ltd.
> Telephone: +44-1865-203192            http://www.decisionsoft.com
> 
> 
Received on Tuesday, 15 May 2001 11:44:32 GMT

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