I want to change complexType in xsd so that it support disorder elements and multiplely occuers elements.
Let's say, I have xsd and config1 as below, and I also want to support both config1 and config2 without changing config1. (config 1 and 2 differs in some element order(IsEnable and Name).) Is that possible?
I try to replace xs:sequence with xs:all, but elements under xs:all can only occuer exact 0 or 1 time.
//xsd
<xs:element name="Config">
<xs:complexType>
<xs:sequence>
<xs:element name="IsEnabled" type="xs:boolean" minOccurs="1" />
<xs:element name="Name" type="xs:string" minOccurs="1" />
<xs:element name="Address" type="xs:string" minOccurs="0" maxOccurs="unbounded">
</xs:sequence>
</xs:complexType>
</xs:element>
//config1
<Congfig>
<IsEnable>true</IsEnable>
<Name>name</Name>
<Address>addr1</Address>
<Address>addr2</Address>
</Config>
//config2
<Congfig>
<Name>name</Name>
<IsEnable>true</IsEnable>
<Address>addr1</Address>
<Address>addr2</Address>
</Config>