Page 1 of 1

Regarding xsd:sequence

Posted: Thu Aug 11, 2005 7:16 pm
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

Posted: Fri Aug 12, 2005 2:30 pm
by george
Hi Shishir,

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

Best Regards,
George