I have following xml structure
<library>
<propertySet>
<SUPorganisationId></SUPorganisationId>
<SUPdataCategory></SUPdataCategory>
<SUPguId></SUPguId>
<LIBuserNotice></LIBuserNotice>
</propertySet>
</library>
Properties inside the propertySet can be appear once (minOccurs="0" maxOccurs="1") and could be any order. When I creating XSD I want to group some of the properties (prefix with SUP) for further using. So I have comeup with following xsd segments.
<xs:element name="propertySet">
<xs:complexType>
<xs:all>
<xs:group ref="CORproperties"/>
<xs:element name="LIBuserNotice" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:complexType>
<xs:element name="propertySet">
<xs:group name="CORproperties">
<xs:all>
<xs:element name="SUPorganisationId" type="xs:integer" minOccurs="0" maxOccurs="1"/>
<xs:element name="SUPdataCategory" type="xs:integer" minOccurs="0" maxOccurs="1"/>
<xs:element name="SUPguId" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:group>
With this xsd I am getting errors saying that usage of xs:all is incorrect. I have forced to use xs:all because of there is no order of appearing properties. But it works fine if I use xs:sequence. Can anybody please direct me to the right path?