W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2004

complexType : extension of a sequence by a choice ?

From: Bruno Chatel <bcha@chadocs.net>
Date: Wed, 4 Feb 2004 17:45:15 +0100
Message-ID: <032701c3eb3e$46caee70$0600a8c0@chadocshome.com>
To: <xmlschema-dev@w3.org>
Cc: <bcha@chadocs.com>, <pat@tireme.fr>

Hi,

I have some questions about extension of complexTypes (and do not found the answer
in the specifications) :

Is extension of a complexType composed of sequence, by using choise is allowed ?
Is extension of a complexType composed of choice, by using sequence is allowed ?

Are these derivations allowed ?

<xs:complexType name="tseq">
    <xs:sequence>
        <xs:element name="t1"/>
        <xs:element name="t2"/>
    </xs:sequence>
</xs:complexType>

<xs:complexType name="tchoi">
    <xs:sequence>
        <xs:element name="t3"/>
        <xs:element name="t4"/>
    </xs:sequence>
</xs:complexType>

<xs:complexType name="tseq-ext-choi">
    <xs:complexContent>
        <xs:extension base="tseq">
            <xs:choice>
                <xs:element name="t3"/>
            </xs:choice>
        </xs:extension>
    </xs:complexContent>
</xs:complexType>

<xs:complexType name="tchoi-ext-seq">
    <xs:complexContent>
        <xs:extension base="tchoi">
            <xs:sequence>
                <xs:element name="t1"/>
            </xs:sequence>
        </xs:extension>
    </xs:complexContent>
</xs:complexType>


If yes, what is the effective content model for these ?

thanks in adance

-- bruno -- 
Bruno Chatel
Tel : (+33) (0)4 96 11 14 57
bcha@chadocs.com
--------------------------------------
Received on Wednesday, 4 February 2004 11:42:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT