- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Mon, 14 Apr 2003 11:24:09 +0100
- To: "Giles Hogben" <giles.hogben@jrc.it>
- CC: xmlschema-dev@w3.org
Hi Giles, > I thought about doing it something like this: > > <xs:element name="home"> > <xs:element ref="category"> > <xs:attribute ref="name"> > <xs:choice> > ?????? > </xs:choice> > </xs:attribute> > </xs:element> > </xs:element> > > but I can't figure out how it should go. In XML Schema choices between values are provided by restricting the relevant simple type with enumerated values, as follows: <xs:attribute name="name"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="X" /> <xs:enumeration value="Y" /> <xs:enumeration value="Z" /> </xs:restriction> </xs:simpleType> </xs:attribute> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Monday, 14 April 2003 06:24:23 UTC