Regarding xsd:sequence

This should cover W3C XML Schema, Relax NG and DTD related problems.
shishir123
Posts: 1
Joined: Thu Aug 11, 2005 7:08 pm

Regarding xsd:sequence

Post by shishir123 »

Hi I have schema something like this

<xs:complexType name="nationType">
<xs:sequence>
<xs:element name="nationName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="USA"/>
<xs:enumeration value="China"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="population" type="xs:int"/>
<xs:element name="languages" type="languageType"/>
<xs:element name="religions" type="religionType" minOccurs="0"/>
<xs:element name="gdp" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>

Here I do not want to keep the restriction of sequence. How can I overcome that?

Thanks,
Shishir
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Shishir,

XML Schema provides also a choice and an all content model.

Best Regards,
George
Post Reply