<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
			xmlns='http://tfr.com/myCourseSchema'
			targetNamespace='http://tfr.com/myCourseSchema'
			elementFormDefault='unqualified'>
			
	<xsd:annotation>
		<xsd:documentation>
			XML Schema defining information
			about a course.
		</xsd:documentation>
	</xsd:annotation>

	<xsd:simpleType name="CourseNumType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[A-Z]{2}[0-9]{3}"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:simpleType name="YearType">
		<xsd:restriction base="xsd:integer">
			<xsd:totalDigits value="4"/>
			<xsd:minInclusive value="2001"/>
		</xsd:restriction>
	</xsd:simpleType>	
	
	<xsd:element name="CourseNo" type="CourseNumType"/> 
	<xsd:element name="Name" type="xsd:string"/>
	<xsd:element name="Section" type="xsd:string"/>
	<xsd:element name="Semester" type="xsd:string"/>
	<xsd:element name="Year" type="YearType"/>
	
	<xsd:complexType name="CourseType">
		<xsd:sequence>
			<xsd:element ref="CourseNo"/> 
			<xsd:element ref="Name"/> 
			<xsd:element ref="Section"/> 
			<xsd:element ref="Semester"/> 
			<xsd:element ref="Year"/> 
		</xsd:sequence>
	</xsd:complexType> 

</xsd:schema>
