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

<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
			xmlns='http://tfr.com/myStudentSchema'
			targetNamespace='http://tfr.com/myStudentSchema'
			elementFormDefault='unqualified'>

	<xsd:annotation>
		<xsd:documentation>
			XML Schema defining information
			about a student
		</xsd:documentation>
	</xsd:annotation>

	<xsd:simpleType name="ID9Type">
		<xsd:restriction base="xsd:integer">
			<xsd:totalDigits value="9"/>
			<xsd:minInclusive value="000000000"/>
		</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="Name" type="xsd:string"/> 
	<xsd:element name="StudentID" type="ID9Type"/> 
	<xsd:element name="YOG" type="YearType"/> 
	<xsd:element name="Email" type="xsd:string"/>
	<xsd:element name="Phone" type="xsd:string"/>
	

	<xsd:complexType name="StudentType">
		<xsd:sequence>
			<xsd:element ref="Name"/>
			<xsd:element ref="StudentID"/>
			<xsd:element ref="YOG"/>
			<xsd:element ref="Email"/>
			<xsd:element ref="Phone"/>
		</xsd:sequence> 
	</xsd:complexType> 
	
</xsd:schema>
