I'm trying to make unordered list of variables in var1 occurs twice and var2 occurs infinite times (Use case in my project is different). The element does not allow me to use maxOccurs.
Is there any work around for what I'm trying to do?
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="testcomment">
<xs:complexType>
<xs:all>
<xs:element name="var1" type="xs:string" maxOccurs="2" />
<xs:element name="var2" type="xs:integer" maxOccurs="unbounded" />
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…