- From: Guillaume Rousse <rousse@ccr.jussieu.fr>
- Date: Fri, 24 Aug 2001 12:09:29 +0200
- To: xmlschema-dev@w3.org
Hello. I would like to derive a basic type by extension , allowing to add other elements and attributes, while restraining some inherited elements allowed values. In classical OO language, i would just override get/set methods, but is it legal using XML schema ? Exemple: I have such a basic Event type, whose date is any year and non mandatory: <complexType name="EventType" abstract="true"> <sequence> <element name="year" type="gYear" minOccurs="0" maxOccurs="1"/> </sequence> </complexType> And such a NameCreation type, whose date is any year>1758, mandatory: <complexType name="NameCreationType"> <complexContent> <extension base="model:EventType"> <sequence> <element name="foo" type="bar" minOccurs="1" maxOccurs="1"/> <element name="year" minOccurs="1" maxOccurs="1"> <simpleType> <restriction base="gYear"> <minInclusive value="1758"/> </restriction> </simpleType> </element> </sequence> </extension> </complexContent> </complexType> -- Guillaume Rousse <rousse@ccr.jussieu.fr> GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html
Received on Friday, 24 August 2001 06:10:37 UTC