I have a XSD file in which I have the following situation:
<xs:element name='test'>
<xs:complexType>
<xs:all>
<xs:element ref='el1' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el2' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el3' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el4' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el5' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el6' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el7' minOccurs='0' maxOccurs='1'/>
<xs:element ref='el8' minOccurs='0' maxOccurs='unbounded'/>
</xs:all>
<xs:attribute name='attr1' use='optional' type='yesno'/>
</xs:complexType>
</xs:element>
And now the problem is, this isn't working so far, cause I can't have maxOccurs='unbounded'
within the all
element. Is there any way to achieve this, e.g. with using xs:choice
?