I have a list of elements in XML.
<disposition label="RegulatoryAgency">
    <dispositionDetails code="114" location="243" />
    <dispositionDetails code="79" location="61"/>
</disposition>
I want to represent this list in XSD. Below is what I have now.
<xs:element name="disposition" type="dispositionList" minOccurs="0"/>
<xs:complexType name="dispositionList">
    <xs:attribute name="label" type="xs:string" use="required"/>
    <xs:sequence>
        <xs:element name="dispositionDetails" type="DispositionDetails" maxOccurs="unbounded"/>
    </xs:sequence>
</xs:complexType>
<xs:complexType name="DispositionDetails">
    <xs:attribute name="code" type="xs:integer" use="required"/>
    <xs:attribute name="location" type="xs:integer" use="required"/>
</xs:complexType>
However it does not work. I get errors like The content of 'dispositionList' is invalid.  Element 'sequence' is invalid, misplaced, or occurs too often. Can anyone help me? Thanks.
'The order of xsd element is relevant.'
1) annotation?
2) (simpleContent|complexContent|((group|all|choice|sequence))?
3) (attribute|attributeGroup)?
<xs:complexType name="dispositionList">
    <xs:sequence>
        <xs:element name="dispositionDetails" type="DispositionDetails" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="label" type="xs:string" use="required"/>
</xs:complexType>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With