bluesky999
Programmer
This is my first time writing xsd file. Could someone please tell me if everything is correct? Thanks.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="
<xs:simpleType name="booltype">
<xs:restriction base="xs:string">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="marketdatatype">
<xs:all>
<xs:element name="instument" type="xs:string"/>
<xs:element name="currency" type="xs:string" minOccurs="0"/>
<xs:element name="quoteType" type="xs:string" minOccurs="0"/>
<xs:element name="fact" type="xs:string" minOccurs="0"/>
<xs:choice minOccurs="0">
<xs:element name="symbol" type="xs:string"/>
<xs:element name="term" type="xs:string"/>
<xs:element name="deliveryDate" type="xs:string"/>
</xs:choice>
<xs:element name="underlyingTerm" type="xs:string" minOccurs="0"/>
<xs:choice minOccurs="0">
<xs:element name="rating" type="xs:string"/>
<xs:element name="crossCurrency" type="xs:string"/>
</xs:choice>
</xs:all>
</xs:complexType>
<xs:complexType name="datetype">
<xs:choice use="required">
<xs:attribute name="start" type="xs:date"/>
<xs:attribute name="obs" type="xsositiveInteger"/>
</xs:choice>
<xs:attribute name="end" type="xs:date" use="required"/>
</xs:complexType>
<xs:complexType name="requesttype">
<xs:attribute name="header" type="booltype"/>
<xs:attribute name="showProxy" type="booltype"/>
<xs:all>
<xs:element name="date" type="datetype" use="required"/>
<xs:element name="marketdata" type="marketdatatype" minOccurs="1" maxOccurs="unbounded"/>
</xs:all>
</xs:complexType>
<xs:element name="request" type="requesttype"/>
</xs:schema>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="
<xs:simpleType name="booltype">
<xs:restriction base="xs:string">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
<xs:enumeration value="yes"/>
<xs:enumeration value="no"/>
<xs:enumeration value="1"/>
<xs:enumeration value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="marketdatatype">
<xs:all>
<xs:element name="instument" type="xs:string"/>
<xs:element name="currency" type="xs:string" minOccurs="0"/>
<xs:element name="quoteType" type="xs:string" minOccurs="0"/>
<xs:element name="fact" type="xs:string" minOccurs="0"/>
<xs:choice minOccurs="0">
<xs:element name="symbol" type="xs:string"/>
<xs:element name="term" type="xs:string"/>
<xs:element name="deliveryDate" type="xs:string"/>
</xs:choice>
<xs:element name="underlyingTerm" type="xs:string" minOccurs="0"/>
<xs:choice minOccurs="0">
<xs:element name="rating" type="xs:string"/>
<xs:element name="crossCurrency" type="xs:string"/>
</xs:choice>
</xs:all>
</xs:complexType>
<xs:complexType name="datetype">
<xs:choice use="required">
<xs:attribute name="start" type="xs:date"/>
<xs:attribute name="obs" type="xsositiveInteger"/>
</xs:choice>
<xs:attribute name="end" type="xs:date" use="required"/>
</xs:complexType>
<xs:complexType name="requesttype">
<xs:attribute name="header" type="booltype"/>
<xs:attribute name="showProxy" type="booltype"/>
<xs:all>
<xs:element name="date" type="datetype" use="required"/>
<xs:element name="marketdata" type="marketdatatype" minOccurs="1" maxOccurs="unbounded"/>
</xs:all>
</xs:complexType>
<xs:element name="request" type="requesttype"/>
</xs:schema>