The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Simple schema definition need some help
will1969
post Oct 25 2014, 12:35 PM
Post #1





Group: Members
Posts: 4
Joined: 4-October 14
Member No.: 21,623



Here is my XML doc:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE courses SYSTEM "http://www.school.com" >


<courses>
<course>
<department>Information Technology</department>
<course_name> OperSysConceptsandAdmn </course_name>
<course_number>IT 3423 </course_number>
<instructor>Susan Vande Ven</instructor>
<course_type lab="true" lecture="true">
<lab>false</lab>
<lecture>true</lecture>
</course_type>
<time>5:30pm</time>
<room>J-266</room>
</course>

<course>
<department>Information Technology</department>
<course_name>Intro Web Development</course_name>
<course_number>IT 3203</course_number>
<instructor>Brown</instructor>
<course_type lab="true" lecture="true">
<lab>true</lab>
<lecture>true</lecture>
</course_type>
<time>7:30pm</time>
<room>J-210</room>
</course>

<course>
<department>Information Technology</department>
<course_name>Advanced Application Development</course_name>
<course_number>IT 3883</course_number>
<instructor>Susan Vande Ven </instructor>
<course_type lab="true" lecture="true">
<lab>true</lab>
<lecture>true</lecture>
</course_type>
<time>4:30pm</time>
<room>J-260</room>
</course>


</courses>

Here is what I have so far not sure even where to go because this is my first time creating a schema:
<xsd:schema
xmlns:xsd="http://www.school.com"
targetNamespace="http://www.school.com"
elementFormDefault="qualified">
<xsd:element name = "department">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="course_name"
type="xsd:string" />
<xsd:element name="course_number"
type="xsd:string"
minOccurs="1"
maxOccurs="unbounded" />
<xsd:element name="course_number">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1877"/>
<xsd:maxInclusive value="2100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema> 25


Not sure what <xsd:minInclusive value="1877"/> <xsd:maxInclusive value="2100"/> is or </xsd:schema> 25 this is a template that I am using.
Not sure if I am heading even in the right direction???
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:49 PM