<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Iain King (Dept. for Education and Skills) -->
<!--
	Changes 1.0 to 1.1
		Reference changed to include StructuresForCTF-v2-6 instead of StructuresForCTF-v2-5

	Changes for 2010
		Updated inline with CTF10 specification
		Reference changed to include StructuresForCTF-v2-5 instead of StructuresForCTF-v2-4

	Changes 1.1 to 1.2
		Reference changed to include StructuresForCTF-v2-4 instead of StructuresForCTF-v2-3

	Changes 1.0 to 1.1
		Reference changed to include StructuresForCTF-v2-3 instead of StructuresForCTF-v2-2

	Changes for 2009
		DocumentQualifierType amended to have a fixed value of "full" in this schema.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.targettracker.org/schemas/ctf" xmlns="http://www.dcsf.gov.uk/schemas/cbds" targetNamespace="http://www.dcsf.gov.uk/schemas/cbds" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1" id="CTF10">
	<xs:include schemaLocation="StructuresForCTF-v2-6.xsd"/>
  <xs:include schemaLocation="V11MigrationSuppInfo-v1-0.xsd"/>
              
	<xs:element name="CTfile" type="CTFfileStructure"/>
	<xs:complexType name="CTFfileStructure">
		<xs:sequence>
			<xs:element name="Header" type="HeaderStructure"/>
			<xs:element name="CTFpupilData" type="PupilsStructure"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="HeaderStructure">
		<xs:sequence>
			<xs:element name="DocumentName">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="Common Transfer File"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="CTFversion">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="10.0"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="DateTime" type="xs:dateTime"/>
			<xs:element name="DocumentQualifier" type="DocumentQualifierType" fixed="partial"/>
			<xs:element name="DataQualifier" type="DataQualifierType" minOccurs="0"/>
			<xs:element name="DataDescriptor" minOccurs="0">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="1"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="SupplierID" type="SupplierIDtype"/>
			<xs:element name="SourceSchool" type="SourceSchoolStructure"/>
			<xs:element name="DestSchool" type="DestSchoolStructure"/>
			<xs:element name="SuppInfo" type="V11MigrationHeaderSuppInfoStructure"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="BasicDetailsStructure">
		<xs:sequence>
			<xs:element name="FormerUPN" type="EitherUPNtype" minOccurs="0"/>
			<xs:element name="PreferredSurname" type="SurnameType" minOccurs="0"/>
			<xs:element name="FormerSurname" type="SurnameType" minOccurs="0"/>
			<xs:element name="PreferredForename" type="ForenameType" minOccurs="0"/>
			<xs:element name="MiddleNames" type="MiddleNamesType" minOccurs="0"/>
			<xs:element name="NCyearActual" type="PupilYeargroupType" minOccurs="0"/>
			<xs:element name="Ethnicity" type="EthnicityType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Numeric Values Invalid.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="EthnicitySource" type="EthnicitySourceType" minOccurs="0"/>
			<xs:element name="Languages" type="LanguagesStructure" minOccurs="0">
				<xs:annotation>
					<xs:documentation>full CTF: Mandatory for English Schools but not for Welsh Schools.
partial CTF: Container is optional.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="FSMeligible" type="xs:boolean" minOccurs="0"/>
			<xs:element name="FSMreviewDate" type="xs:date" minOccurs="0"/>
			<xs:element name="MedicalFlag" type="xs:boolean" minOccurs="0"/>
			<xs:element name="Disabilities" type="DisabilityStructure" minOccurs="0"/>
			<xs:element name="EnrolStatus" type="EnrolStatusType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Values to be imported into LA systems but ignored by school MIS's. </xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SuppInfo" type="V11MigrationBasicDetailsSuppInfoStructure" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PupilStructure">
		<xs:sequence>
			<xs:element name="UPN" type="EitherUPNtype"/>
			<xs:element name="UniqueLearnerNumber" minOccurs="0">
				<xs:simpleType>
					<xs:annotation>
						<xs:documentation>
The ULN is a ten digit number with zero not allowed as the first character.
The last digit is a check digit. To validate the check digit first calculate the following sum:
10 × first digit + 9 x second digit+…+ 3 x eighth digit + 2 × ninth digit.  Then divide this total by 11.
The remainder will be a number in the range 0 to 10. If the remainder is 0, reject the number.
Otherwise, subtract the remainder from 10. The result will be in the range 0,…,9 and provides the check digit.
					</xs:documentation>
					</xs:annotation>
					<xs:restriction base="xs:nonNegativeInteger">
						<xs:pattern value="[1-9][0-9]{9}"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Surname" type="SurnameType"/>
			<xs:element name="Forename" type="ForenameType"/>
			<xs:element name="DOB" type="xs:date"/>
			<xs:element name="Gender" type="SexAtBirthType"/>
			<xs:element name="BasicDetails" type="BasicDetailsStructure" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Optional for partial transfer</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="NAWdetails" type="NAWdetailsStructure" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Transfers within wales only. Discard on cross border move.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="LookedAfter" type="LookedAfterStructure" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Include Only if InCare [is true.]</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SENhistory" type="SENhistoryStructure" minOccurs="0">
				<xs:annotation>
					<xs:documentation>container may be omitted if the only entry in SENstatus is 0 or N</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Address" type="AddressStructure" minOccurs="0"/>
			<xs:element name="Contacts" type="ContactsStructure" minOccurs="0"/>
			<xs:element name="Attendance" type="AttendanceHistoryStructure" minOccurs="0"/>
			<xs:element name="StageAssessments" type="StageAssessmentsStructure" minOccurs="0"/>
			<xs:element name="SchoolHistory" type="SchoolHistoryStructure" minOccurs="0"/>
			<xs:element name="SuppInfo" type="V11MigrationPupilSuppInfoStructure" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PupilsStructure">
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="Pupil" type="PupilStructure"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SourceSchoolStructure">
		<xs:annotation>
			<xs:documentation>School which pupil is leaving</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="LEA">
				<xs:simpleType>
					<xs:union memberTypes="LEAtype LEAsForCTFtype"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Estab" type="AllEstabsType"/>
			<xs:element name="SchoolName" type="SchoolNameType"/>
			<xs:element name="AcademicYear" type="AcademicYearType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="DestSchoolStructure">
		<xs:annotation>
			<xs:documentation>School which pupil is going to</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="LEA">
				<xs:simpleType>
					<xs:union memberTypes="LEAtype LEAsForCTFtype"/>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Estab" type="AllEstabsType"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
