Example of XML Schema





The following is the source code of TrainSchema.xml
<?xml version="1.0">
<Schema name="TrainSchema"
xmlns="urn:schema-microsoft.com:xml-data"
xmlns:dt="urn:schema-microsoft.com:xml-datatypes">
<ElemenType name="duration" content="textOnly" dt:type="time"/>
<ElemenType name="distance" content="textOnly" dt:type="float"/>
<ElemenType name="location" content="textOnly"/>
<ElemenType name="comments" content="textOnly"/>
<AttributeType name="type" dt:type="enumeration"
dt:values="running cycling swimming"/>
<AttributeType name="date" dt:type="date"/>
<ElemenType name="session" content="eltOnly" order="seq"/>
<description>
This element type represents a single training session.
</description>
<ElemenType name="duration" minOccurs="1" maxOccurs="1"/>
<ElemenType name="distance" minOccurs="1" maxOccurs="1"/>
<ElemenType name="location" minOccurs="1" maxOccurs="1"/>
<ElemenType name="comments" minOccurs="1" maxOccurs="1"/>
<attribute type="type" default="running"/>
<attribute type="date"/>
</ElemenType>
<ElemenType name="trainlog" content="eltOnly"/>
<description>
This element type represents training log consisting of one or more training session.
</description>
<ElemenType name="session" minOccurs="1" maxOccurs="1"/>
</ElemenType>
</Schema>
Domain Name Search
|