I would like to create a XSD like so:
<xs:schema>
<xs:element name="a">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="b" minOccurs="1" maxOccurs="unbounded"/>
<xs:any minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Explaination:
Element a required, inside the element:
- Any element 0 to infinity times.
- Element b 1 to infinity times.
- Any element 0 to infinity times.
I tried to use choice
, all
and etc, but I did not find any solution.
Error from XmlSpy:
<any...>
makes the content model non-deterministic against<xs:element name="b" ...>
. Possible causes: name equality, overlapping occurrence or substitution groups.