We have a generated XML schema that I am a bit confused on the meaning of the schema (ie, what exactly it is looking for to be valid)
<xs:element name="element">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="firstitem_id" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="unbounded" name="seconditem_id">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="order" type="xs:integer" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
From what I was told, this is really asking for the following:
<element>
<firstitem_id>17</firstitem_id>
<seconditem_id order="2">34</seconditem_id>
</element>
Is this true, and why would this specification show up in this manner?
That schema fragment defines the following structural rules for the “element” element:
This is one valid example:
This is another:
This is another:
And another:
And another: