- From: <PAG@cdt.wqxs.com>
- Date: Wed, 22 Jan 2003 15:22:12 +0100
- To: xmlschema-dev@w3.org
Hello !
I wrote the following schema snippet :
<xsd:element name="choix">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" type="Item" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attributeGroup ref="AttrChoix"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Item">
<xsd:simpleContent>
<xsd:extension base="NEString">
<xsd:attribute name="id" type="xsd:ID" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="NEString">
<xsd:restriction base="xsd:normalizedString">
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
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.
Regards,
Pascal.
Received on Wednesday, 22 January 2003 09:25:18 UTC