A easy question about XML schema(.xsd file)!!!
This is my homework, xml document.
cwmm.xsd ----:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="file:///students/u2585798/comp3410/a1"
xmlns:cwmm="file:///students/u2585798/comp3410/a1"
elementFormDefault="qualified">
<xs:element name="workflow" type="xs:workflowtype"/>
<xs:complexType name="workflowtype">
<xs:sequence>
<xs:element name="workers" type="xs:workerstype" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="manuscripts" type="xs:manuscriptstype" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="workerstype">
<xs:sequence>
<xs:element name="worker" type="xs:workertype" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="workertype">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="contact" type="xs:contacttype"/>
</xs:sequence>
<xs:attribute name="id" type="string"/>
</xs:complexType>
<xs:complexType name="contacttype">
<xs:sequence>
<xs:element name="phone" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="address" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="manuscriptstype">
<xs:sequence>
<xs:element name="manuscript" type="xs:manuscripttype"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="manuscripttype">
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="author" type="xs:string"
minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="editor" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="reviewer" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="submission-date" type="xs:date"/>
<xs:element name="review-date" type="xs:date"/>
<xs:element name="edit-date" type="xs:date"/>
<xs:element name="submission-days" type="xs:string"/>
<xs:element name="review-days" type="xs:string"/>
<xs:element name="edit-days" type="xs:string"/>
<xs:element name="version" type="xs:versiontype"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="journal" type="xs:string"/>
</xs:complexType>
<xs:complexType name="versiontype">
<xs:sequence>
<xs:element name="link" type="xs:string"/>
<xs:element name="exposure" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
<xs:attribute name="revision" type="xs:string"/>
</xs:complexType>
<xs:complexType name="journaltype">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="workerlist" type="xs:workerlisttype"
minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="workerlisttype">
<xs:sequence>
<xs:element name="worker" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
</xs:schema>
----------------------------------------------------------------------------
cwmm.xml --------------:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="cwmm.xsl"?>
<cwmm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="cwmm.xsd">
<workflow>
<workers>
<worker id="1">
<name>Rodolfo Villarroel</name>
<contact>
<address>1 Foo St</address>
<phone>+612 6276 6453</phone>
</contact>
</worker>
<worker id="2">
<name>Eduardo Ferndez-Medina</name>
<contact>
<address>2 Foo St</address>
<phone>+612 6234 7635</phone>
</contact>
</worker>
<worker id="3">
<name>Mario Piattini</name>
<contact>
<address>3 Foo St</address>
<phone>+612 8734 324</phone>
</contact>
</worker>
</workers>
<manuscripts>
<manuscript id="1" journal="1">
<title>My Manuscript</title>
<author>1</author>
<author>5</author>
<editor>2</editor>
<reviewer>3</reviewer>
<reviewer>4</reviewer>
<submission-date>2006-08-25</submission-date>
<review-date>2006-08-30</review-date>
<editing-date>2006-08-10</editing-date>
<submission-days>10</submission-days>
<review-days>10</review-days>
<edit-days>10</edit-days>
<version id="1" status="draft" revision="1">
<link>http://example.com/draft1.html</link>
<exposure>Public Comments</exposure>
</version>
<version id="2" status="draft" revision="2">
<link>http://example.com/draft2.html</link>
<exposure>Private</exposure>
</version>
<version id="3" status="final" revision="1">
<link>http://example.com/final.html</link>
</version>
</manuscript>
</manuscripts>
<journal id="1">
<name>Journal of Research and Practice in Information Technology</name>
<workerlist>
<worker>1212</worker>
<worker>2323</worker>
</workerlist>
</journal>
<journal id="2">
<name>Conferences in Research and Practice in Information Technology</name>
<workerlist>
<worker>1212</worker>
<worker>2323</worker>
</workerlist>
</journal>
<journal id="3">
<name>Astroparticle Physics</name>
<workerlist>
<worker>1212</worker>
<worker>2323</worker>
</workerlist>
</journal>
</workflow>