Re: Extnsions for extended complexTypes

Hi Michael,

> I have some problems with understanding "3.4.6 Constraints on Complex
> Type Definition Schema Component"[1].My reading is that if the
> complexType "A1" is an extension of complexType "A0" then complexType
> "A2" cannot bean extension of complexType "A1" - only restricted
> complex type would be valid. Is it correct interpretation?
> Eddie:
> I don't think so. What in "Schema Component Constraint: Derivation
> Valid (Extension)" [1] makes you believe that this would be invalid?
>  Invalid schema: <schema>    <complexType name="A0">
> <sequence>            <element name="a0" type="string"/>
> </sequence>    </complexType>    <complexType name="A1">
> <extension base="A0">            <sequence>                <element
> name="a1" type="string"/>            </sequence>
> </extension>    </complexType>    <complexType name="A2">
> <extension base="A1">            <sequence>                <element
> name="a2" type="string"/>            </sequence>
> </extension>    </complexType>    <element name="test"
> type="A2"/></schema>
> Eddie:
> Note that the above schema miss the <complexContent> child elements of
> <complexType> in the extensions.
>  If it is can someone explain why such a restriction on schema
> validity has been set.
>
> Eddie:
> I don't think this restriction exists.
>
> Cheers,
> /Eddie
>
> [1] http://www.w3.org/TR/xmlschema-1/#cos-ct-extends

Received on Wednesday, 30 May 2001 20:27:34 UTC