Another thing u can try is the following:


<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <xs:element name="father" type="xs:string"/>
    <xs:element name="mother" type="xs:string"/>
    <xs:element name="son" type="xs:string"/>
    <xs:element name="daughter" type="xs:string"/>
    <xs:element name="pet" type="xs:string"/>

    <xs:element name="family">
        <xs:complexType>
            <xs:sequence>
                  <xs:choice minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="father"/>
                        <xs:element ref="mother"/>
                        <xs:element ref="son"/>
                        <xs:element ref="daughter"/>
                        <xs:element ref="pet"/>
                  </xs:choice>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

That will allow multiple sets of parents but allows any order.


Ankit Pasricha
XML Parser Development
IBM Toronto Lab
8200 Warden Avenue, Ontario L6G 1C7
Phone: (905) 413 4941


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to