Is it possible to use inheritance in xsd with variable element order?
Basically, something like this does not work, since "all" is not allowed inside "extension":
<xs:complexType name="root">
<xs:complexContent>
<xs:all>
<xs:element name="A" type="xs:string"/>
<xs:element name="B" type="xs:string"/>
</xs:all>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="extended">
<xs:complexContent>
<xs:extension base="root">
<xs:all>
<xs:element name="C" type="xs:string"/>
<xs:element name="D" type="xs:string"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
The simplest solution would be just to use "sequence" instead of "all", but in my case this is not an option, since the element order is not guaranteed, so something like this:
<obj>
<B/>
<C/>
<D/>
<A/>
</obj>
will be invalid because of the wrong element order, but is should not be since all the elements are present.