W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

Re: 'all' within 'complexContent' -- which parser is correct?

From: Eddie Robertsson <erobertsson@allette.com.au>
Date: Thu, 31 Oct 2002 10:07:41 +1100
Message-ID: <3DC0663D.2020906@allette.com.au>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
CC: Evgeny Sologubov <Eugals@mail.ru>, xmlschema-dev@w3.org

>
>
>>Since a derivation by extension always creates the new type by
>>"sequencing" together the content in the base type with the content
>>in the derived type you can *never* use <xs:all> as part of an
>>extension.
>>    
>>
>
>If the base type def'n was empty and the extension was all and only a
>valid <all>, I think the sequence is waived and the result would be OK.
>
Yes, that's probably correct. So, the following would probably be valid:

<xs:complexType name="base">
   <xs:complexContent>
      <xs:restriction base="xs:anyType">
         <xs:attribute name="name" type="xs:string"/>
      </xs:restriction>
   </xs:complexContent>
</xs:complexType>

<xs:complexType name="base">
   <xs:complexContent>
      <xs:extension base="base">
          <xs:all>
             <xs:element name="1"/>
             <xs:element name="2"/>
          </xs:all>
      </xs:extension>
   </xs:complexContent>
</xs:complexType>

Yes, I think that makes sense.

Thanks for the correction.
/Eddie

>
>ht
>  
>
Received on Wednesday, 30 October 2002 18:08:50 GMT

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