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

>
>
>>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 UTC