[
Lists Home |
Date Index |
Thread Index
]
"Volker Luedeling" <v.luedeling@brox.de> writes:
> My base type definition:
>
> <xs:complexType name="Parameter">
> <xs:simpleContent>
> <xs:extension base="xs:anySimpleType">
> <xs:attribute name="Name" type="xs:string" use="required"/>
> <xs:attribute name="Comment" type="xs:string" use="optional"/>
> <xs:attribute name="Comment" type="xs:string" use="optional"/>
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
>
> Definition of element "DateParameter":
>
> <xs:element name="DateParameter">
> <xs:complexType>
> <xs:simpleContent>
> <xs:restriction base="Parameter">
> <xs:simpleType>
> <xs:restriction base="xs:date"></xs:restriction>
> </xs:simpleType>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:element>
>
This is correct, and the right way to achieve your stated goal.
You can go a stop further, and make the content model for ParameterSet
be simply Parameter*, where Parameter is declared at the top-level
with abstract='true', and then just declare each of your specific
parameter elements with substitutionGroup='my:Parameter'.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-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]
|