I don't understand how I should define my complex type.
Today I have this:
<xsd:element name="batch_requests_callbacks">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="document_id" minOccurs="1" maxOccurs="1"/>
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element ref="filename"/>
<xsd:element ref="error"/>
</xsd:choice>
<xsd:element ref="author" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="version" default="1.0"/>
</xsd:complexType>
</xsd:element>
But then, the tag's order inside the xsd:sequence
is important and I don't want that behavior.
If I use xsd:all
I don't have the tag order but I cannot set maxOccurs
to unbounded more over I cannot use xsd:choice
inside a xsd:all
What are my alternatives?