This is an XML schema question.
I know that xsd:all
element can't appear in a sequence (must be the top level element of its type).
That is, I cannot use the following:
<xsd:complexType name="Application">
<xsd:sequence>
<xsd:element ref="Name"></xsd:element>
<xsd:all>
<xsd:element ref="ADD"></xsd:element>
<xsd:element ref="DELETE"></xsd:element>
</xsd:all>
</xsd:sequence>
</xsd:complexType>
My question is how to declare the "ADD" and "DELETE" elements above in any order (unordered set) but still make sure that the element "Name" would be the first and always appear. (Think of the situation where I have not only "ADD" and "DELETE" but about 10 or more unordered elements set: ADD, DELETE, EDIT etc...)
IMPORTANT NOTE: the ADD and DELETE may appear only ONCE, but their order is not matter:
<Application>
<NAME>
<DELETE>
<ADD>
</Application>
but NOT:
<Application>
<NAME>
<DELETE>
<ADD>
<DELETE> <!--cannot appear twice-->
</Application>