<!--SIF Implementation Specification UK 1.1-4 (September 18, 2009)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/uk/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/uk/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="LearnerPersonalType">
    <xs:annotation>
      <xs:documentation>This object contains personal information related to a learner. As most
learners are enroled in the school or establishment publishing this object,
basic enrolment information is also provided to aid in overall SIF
performance.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="LocalId" minOccurs="0" nillable="true" type="sif:LocalIdType">
        <xs:annotation>
          <xs:documentation>The locally-assigned identifier for this learner. This can be the internal pupil number or any other number as determined by the publishing agent.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AlertMsgList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="AlertMsg" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>This is an alert message that is associated with the person.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:normalizedString">
                    <xs:attribute name="Type" use="required">
                      <xs:annotation>
                        <xs:documentation>This attribute specifies what type of alert message this is.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:token">
                          <xs:enumeration value="Legal" />
                          <xs:enumeration value="Discipline" />
                          <xs:enumeration value="Educational" />
                          <xs:enumeration value="Other" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="MedicalAlertMsgList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MedicalAlertMsg" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>Medical alert associated with the person.</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:normalizedString">
                    <xs:attribute name="Severity" use="required">
                      <xs:annotation>
                        <xs:documentation>The level of severity of this medical alert.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:token">
                          <xs:enumeration value="Low" />
                          <xs:enumeration value="Moderate" />
                          <xs:enumeration value="High" />
                          <xs:enumeration value="Severe" />
                          <xs:enumeration value="Unknown" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:attribute>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element ref="sif:PersonalInformation" minOccurs="0" />
      <xs:element name="UIPI" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Unique Internal Pupil Number.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="UPN" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Unique Pupil Number (UPN) allocated to each learner in maintained schools in England and Wales. It is an identifier for use in the educational context during a child's school career only and subject to Data Protection restrictions.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="UPNAllocationDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:documentation>Date UPN was allocated by the LA.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FormerUPNList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="UPN" minOccurs="0" maxOccurs="unbounded" type="xs:normalizedString">
              <xs:annotation>
                <xs:documentation>A former UPN assigned to the pupil whilst at a school (eg temporary UPN was allocated when the pupil was first admitted to the school but subsequently replaced by the permanent UPN being retrieved from a previous school).</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ULN" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:normalizedString">
            <xs:annotation>
              <xs:documentation>Unique Learner Number (ULN), a 10-digit number where zero is not allowed as the leading digit.</xs:documentation>
            </xs:annotation>
            <xs:pattern value="[1-9][0-9]{9}" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FamilyStructure" minOccurs="0" nillable="true" type="sif:UKFamilyStructureType">
        <xs:annotation>
          <xs:documentation>Indicates type of family structure learner is living in.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="InCare" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Current" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Indicates if the learner is "looked after" currently.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="Yes" />
                  <xs:enumeration value="No" />
                  <xs:enumeration value="Unknown" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Type" minOccurs="0" nillable="true" type="sif:UKInCareTypeType">
              <xs:annotation>
                <xs:documentation>Type of care the learner is in (eg fostering, children's home).</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element ref="sif:LAId" minOccurs="0" />
            <xs:element name="AtCurrentSchool" minOccurs="0" nillable="true">
              <xs:annotation>
                <xs:documentation>Indicates if the learner has ever been in care while at this school.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="Yes" />
                  <xs:enumeration value="No" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="PersonalEducationPlan" minOccurs="0" nillable="true">
              <xs:annotation>
                <xs:documentation>Indicates if the learner in care has a personal education plan.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="Yes" />
                  <xs:enumeration value="No" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ConnexionsAgreement" minOccurs="0" nillable="true" type="sif:UKConnexionsAgreementType">
        <xs:annotation>
          <xs:documentation>Indicates if parents have consented to allow learner data to be shared with Connexions (Middle, Secondary and Special Schools only).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChildProtectionRegister" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="IsRegistered" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Indicates if the learner has been registered on the Child Protection Register.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="Yes" />
                  <xs:enumeration value="No" />
                  <xs:enumeration value="Unknown" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="LAId" minOccurs="0" nillable="true" type="sif:LAIdType">
              <xs:annotation>
                <xs:documentation>The LA in which the learner was registered for protection.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SiblingRegistered" minOccurs="0" nillable="true">
              <xs:annotation>
                <xs:documentation>Indicates if the learner has a sibling that is also on the Child Protection Register.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="Yes" />
                  <xs:enumeration value="No" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GiftedTalented" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Learner qualifies for Gifted/Talented status.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="Yes" />
            <xs:enumeration value="No" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="HomeLA" minOccurs="0" nillable="true" type="sif:LAIdType">
        <xs:annotation>
          <xs:documentation>The LA in which the learner lives but not necessarily the one in which they attend school.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearnerIdentity" minOccurs="0" nillable="true" type="sif:UKLearnerIdentityType">
        <xs:annotation>
          <xs:documentation>Classification of national identity. (Wales)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ModeOfTravel" minOccurs="0" nillable="true" type="sif:UKUsualModeOfTravelType">
        <xs:annotation>
          <xs:documentation>The usual mode of travel normally used by the learner for the greater part (in distance) of the journey to and from school.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Pregnant" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Learner is pregnant.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="Yes" />
            <xs:enumeration value="No" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SiblingList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Sibling" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="LearnerPersonalRefId" minOccurs="0" type="sif:IdRefType">
                    <xs:annotation>
                      <xs:documentation>The ID (GUID) of the LearnerPersonal record for this sibling.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="UIPI" minOccurs="0" type="xs:normalizedString">
                    <xs:annotation>
                      <xs:documentation>The Unique Internal Pupil Number for a sibling of this learner.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="UniformAllowance" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Learner is paid a uniform allowance.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="Yes" />
            <xs:enumeration value="No" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CurrentSchoolEnrolment" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sif:LAId" minOccurs="0" />
            <xs:element ref="sif:EstablishmentId" minOccurs="0" />
            <xs:element ref="sif:NCYearGroup" minOccurs="0" />
          </xs:sequence>
          <xs:attribute name="LearnerSchoolEnrolmentRefId" use="required" type="sif:IdRefType">
            <xs:annotation>
              <xs:documentation>The ID (GUID) of the LearnerSchoolEnrolment record associated with this learner that is also designated as the current or current main enrolment.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="PreviousEstablishmentList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="PreviousEstablishment" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="EstablishmentId" minOccurs="0" nillable="true" type="sif:EstablishmentIdType">
                    <xs:annotation>
                      <xs:documentation>Establishment Number for this school</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="EstablishmentName" minOccurs="0" nillable="true" type="xs:normalizedString">
                    <xs:annotation>
                      <xs:documentation>School's name as indicated on the Annual Schools Census.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LAId" minOccurs="0" nillable="true" type="sif:LAIdType">
                    <xs:annotation>
                      <xs:documentation>The 3-digit LA number assigned by DfES.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="EntryDate" minOccurs="0" nillable="true" type="xs:date">
                    <xs:annotation>
                      <xs:documentation>The date the learner entered this school or establishment.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ExitDate" minOccurs="0" nillable="true" type="xs:date">
                    <xs:annotation>
                      <xs:documentation>The date the learner exited this school or establishment.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ExitType" minOccurs="0" nillable="true" type="sif:UKLeavingReasonType">
                    <xs:annotation>
                      <xs:documentation>Code indicating the type of exit from this school or establishment.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LastSchool" minOccurs="0" nillable="true">
                    <xs:annotation>
                      <xs:documentation>An indication of whether the described school or establishment was the last establishment the learner attended. Note that it is possible that more than one establishment can be marked as LastSchool when a learner is enroled in more than one school simultaneously.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:token">
                        <xs:enumeration value="Yes" />
                        <xs:enumeration value="No" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType">
        <xs:unique name="SIF_ExtendedElementsKey19">
          <xs:selector xpath="./sif:SIF_ExtendedElement" />
          <xs:field xpath="@Name" />
        </xs:unique>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>The ID (GUID) of the learner. Note that this GUID may be the same one assigned to this person when this person is either a contact (ContactPersonal) or a member of the workforce (WorkforcePersonal).</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="LearnerPersonal" type="sif:LearnerPersonalType">
    <xs:key name="LearnerPersonalKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

</xs:schema>