<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:types="http://www.slc.co.uk/course/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.slc.co.uk/course/types/1.0" targetNamespace="http://www.slc.co.uk/course/types/1.0" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<xs:simpleType name="methodOfAttendance">
		<xs:annotation>
			<xs:documentation>MOA restriction.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="FE">
				<xs:annotation>
					<xs:documentation>Full Time And Extended Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FP">
				<xs:annotation>
					<xs:documentation>Full Time And Part Time Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FS">
				<xs:annotation>
					<xs:documentation>Full Time Plus Sandwich Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FT">
				<xs:annotation>
					<xs:documentation>Full Time Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="OT">
				<xs:annotation>
					<xs:documentation>Other - Unknown Method of Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="PT">
				<xs:annotation>
					<xs:documentation>Part Time Attendance</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DL">
				<xs:annotation>
					<xs:documentation>Full Time Distance Learning</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseStatus">
		<xs:annotation>
			<xs:documentation>Course statuses, either open or closed.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="C">
				<xs:annotation>
					<xs:documentation>Closed</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="O">
				<xs:annotation>
					<xs:documentation>Open</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseTypes">
		<xs:annotation>
			<xs:documentation>Type of Course</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="ACCELERATED">
				<xs:annotation>
					<xs:documentation>Course compresses a two year course into one year of study</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ART TEACHER">
				<xs:annotation>
					<xs:documentation>Art Teacher</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="EMERGENCY">
				<xs:annotation>
					<xs:documentation>Emergency Course Type</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FRANCHISED">
				<xs:annotation>
					<xs:documentation>Franchised Course</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="OTHER">
				<xs:annotation>
					<xs:documentation>Other Eligible Course</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="PART TIME">
				<xs:annotation>
					<xs:documentation>Part Time Course</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="PGCE">
				<xs:annotation>
					<xs:documentation>Post Graduate Certificate In Education</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="YN">
		<xs:annotation>
			<xs:appinfo>
				<javaType name="java.lang.Boolean" parseMethod="uk.co.slc.hei.crs.webservice.convertors.BooleanConverter.valueOf" printMethod="uk.co.slc.hei.crs.webservice.convertors.BooleanConverter.toString"/>
			</xs:appinfo>
			<xs:documentation>matches Y or N</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Y"/>
			<xs:enumeration value="N"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="yesNo">
		<xs:annotation>
			<xs:documentation>Simple type for Y/N values</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:boolean"/>
	</xs:simpleType>
	<xs:simpleType name="username">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="4000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="password">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="4000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="heiCode">
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-Z]{4}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionFullName">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="50"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionShortName">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="45"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionCountry">
		<xs:restriction base="xs:string">
			<xs:maxLength value="16"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ucasCollegeCode">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9A-Z]{3}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="slcCourseCode">
		<xs:restriction base="xs:int">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="999999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseTitle">
		<xs:restriction base="xs:string">
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseShortName">
		<xs:restriction base="xs:string">
			<xs:maxLength value="41"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseDescription">
		<xs:restriction base="xs:string">
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseDuration">
		<xs:annotation>
			<xs:documentation>
				The duration of a course in years.  N.B. although this can theoretically
				be 0-99 as shown in the restriction clause below, this is currently restricted
				to the values 1-6 within the HEI Courses application and values outside
				this range will cause an error.  Subsequent revisions of this specification
				may bring the restriction clause into line with the application validation.
				This has not been done at this stage due to the overhead of regenerating the
				dependent code.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:int">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="99"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseYearYearOfStudy">
		<xs:annotation>
			<xs:documentation>
				The year of study.  Course years may run from 1 through to the courseDuration
				or from 0 through to courseDuration - 1.  This is to allow for a foundation 
				year that has courseYearYearOfStudy = 0.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:int">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseYearFeeCap">
		<xs:annotation>
			<xs:documentation>
				The course year fee cap.  Must always be less than or equal to the
				institutionYearFeeCap value.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseTermNumber">
		<xs:annotation>
			<xs:documentation>
			    The number of a course term.  In practice, there will always be 
			    exactly 3 terms, numbered 1, 2 and 3.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:int">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="courseHeiCourseCode">
		<xs:restriction base="xs:string">
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionYearFeeCap">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionYearVariableFees">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="institutionYearPredictedNumberOfCourses">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="locationName">
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="locationAddressLine">
		<xs:restriction base="xs:string">
			<xs:maxLength value="60"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="postcode">
		<xs:restriction base="xs:string">
			<xs:maxLength value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="phoneNumber">
		<xs:restriction base="xs:string">
			<xs:maxLength value="20"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="emailAddress">
		<xs:restriction base="xs:string">
			<xs:maxLength value="60"/>
			<xs:pattern value="[^@]+@[^\.]+\..+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="academicYear">
		<xs:restriction base="xs:int">
			<xs:minInclusive value="1980"/>
			<xs:maxInclusive value="9999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="date">
		<xs:restriction base="xs:date"/>
	</xs:simpleType>
	<xs:simpleType name="timeStamp">
		<xs:restriction base="xs:dateTime"/>
	</xs:simpleType>
	<xs:simpleType name="campus">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9a-zA-Z]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="code">
		<xs:simpleContent>
			<xs:extension base="types:codeValue">
				<xs:attribute name="type" type="types:codeType"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="codeValue">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="4"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="codeType">
		<xs:annotation>
			<xs:documentation>
				Code types restriction.  Used to define the type of a code.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="ucas">
				<xs:annotation>
					<xs:documentation>UCAS Code</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="jacs">
				<xs:annotation>
					<xs:documentation>JACS Code</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ucasSuffix">
				<xs:annotation>
					<xs:documentation>UCAS Suffix (Campus?)</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="qualificationCode">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="qualificationDescription">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="100"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>

