- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 20 Dec 2002 17:58:19 +0000
- To: "Gregory M. Messner" <gmessner@breezefactor.com>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
"Gregory M. Messner" <gmessner@breezefactor.com> writes:
> 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>
Not allowed -- a restriction has to be a restriction, you can't
achieve extension this way.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2002, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 20 December 2002 12:58:15 UTC