/Users/lyon/j4p/src/xml/classInfo/schema examples/multi schema include/Course.xsd
|
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
4 xmlns='http://tfr.com/myClassInfoSchema'
5 targetNamespace='http://tfr.com/myClassInfoSchema'
6 elementFormDefault='qualified'>
7
8 <xsd:annotation>
9 <xsd:documentation>
10 XML Schema defining information
11 about a course.
12 </xsd:documentation>
13 </xsd:annotation>
14
15 <xsd:simpleType name="CourseNumType">
16 <xsd:restriction base="xsd:string">
17 <xsd:pattern value="[A-Z]{2}[0-9]{3}"/>
18 </xsd:restriction>
19 </xsd:simpleType>
20
21 <xsd:element name="CourseNo" type="CourseNumType"/>
22 <xsd:element name="CourseName" type="xsd:string"/>
23 <xsd:element name="Section" type="xsd:string"/>
24 <xsd:element name="Semester" type="xsd:string"/>
25
26 <xsd:complexType name="CourseType">
27 <xsd:sequence>
28 <xsd:element ref="CourseNo"/>
29 <xsd:element ref="CourseName"/>
30 <xsd:element ref="Section"/>
31 <xsd:element ref="Semester"/>
32 </xsd:sequence>
33 </xsd:complexType>
34
35 </xsd:schema>
36