W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2003

How to redefine a complex type already defined by extension

From: <PAG@cdt.wqxs.com>
Date: Wed, 22 Jan 2003 15:22:12 +0100
To: xmlschema-dev@w3.org
Message-ID: <3E2EB724.27881.14D1983@localhost>

Hello !

I wrote the following schema snippet :

	<xsd:element name="choix">
				<xsd:element name="item" type="Item" maxOccurs="unbounded"/>
			<xsd:attributeGroup ref="AttrChoix"/>

	<xsd:complexType name="Item">
			<xsd:extension base="NEString">
				<xsd:attribute name="id" type="xsd:ID" use="required"/>

	<xsd:simpleType name="NEString">
		<xsd:restriction base="xsd:normalizedString">
			<xsd:minLength value="1"/>

I want to define a new type 'ItemLibre' which is the same as 'Item' but based on 
'normalizedString' instead of 'NEString' (so with no min length constraint). I also 
want my new type to have one additional attribute named 'type'. Finally I want that 
child element 'item' in 'choix' being allowed to be of type 'ItemLibre' or 'Item'. What's 
the best solution to write such a definition.


Received on Wednesday, 22 January 2003 09:25:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:59 UTC