- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 12 Feb 2001 08:22:49 +0000
- To: Simon Cox <Simon.Cox@dem.csiro.au>
- Cc: Holger.Juschkewitz@de.ibm.com, xmlschema-dev@w3.org
Simon Cox <Simon.Cox@dem.csiro.au> writes:
> An alternative way to accomplish what you are doing is to use
> an attributeGroup instead of type derivation.
>
> <attributeGroup name="attribute">
> <attribute name="isNullable" type="boolean" use="optional"/>
> <attribute name="isQueryable" type="boolean" use="optional"/>
> <attribute name="isUpdatable" type="boolean" use="optional"/>
> </attributeGroup>
>
> <element name="ShipmentNo">
> <complexType>
> <simpleContent>
> <restriction base="integer"/>
> </simpleContent>
> <attributeGroup ref="attribute"/>
> </complexType>
> </element>
Nearly, but not quite. The above is not valid. The following has the
(I think) intended meaning:
<element name="ShipmentNo">
<complexType>
<simpleContent>
<extension base="integer">
<attributeGroup ref="attribute"/>
</extension>
</simpleContent>
</complexType>
</element>
You can't restrict and extend in a single step
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, 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/
Received on Monday, 12 February 2001 03:22:54 UTC