<!--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="LearnerAttendanceSummaryType">
    <xs:sequence>
      <xs:element ref="sif:SchoolYear" minOccurs="0" />
      <xs:element name="StartDate" minOccurs="0" type="xs:date" />
      <xs:element name="EndDate" minOccurs="0" type="xs:date" />
      <xs:element name="ReasonsList" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Reason" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Code" minOccurs="0" type="sif:UKAttendanceCodeType" />
                  <xs:element name="Type" minOccurs="0">
                    <xs:simpleType>
                      <xs:restriction base="xs:token">
                        <xs:enumeration value="Absent" />
                        <xs:enumeration value="EarlyDeparture" />
                        <xs:enumeration value="Late" />
                        <xs:enumeration value="Partial" />
                        <xs:enumeration value="Present" />
                        <xs:enumeration value="Other" />
                        <xs:enumeration value="NA" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="Status" minOccurs="0">
                    <xs:simpleType>
                      <xs:restriction base="xs:token">
                        <xs:enumeration value="Authorised" />
                        <xs:enumeration value="Unauthorised" />
                        <xs:enumeration value="Unknown" />
                        <xs:enumeration value="NA" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="Total" minOccurs="0" type="xs:unsignedInt" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SessionsAttendedTotal" minOccurs="0" type="xs:unsignedInt" />
      <xs:element name="SessionsPossible" minOccurs="0" type="xs:unsignedInt" />
      <xs:element name="AuthorisedAbsences" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="UnauthorisedAbsences" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="AlternativeTuitionHours" minOccurs="0" nillable="true" type="sif:UKTuitionHoursType" />
      <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_ExtendedElementsKey15">
          <xs:selector xpath="./sif:SIF_ExtendedElement" />
          <xs:field xpath="@Name" />
        </xs:unique>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="LearnerPersonalRefId" use="required" type="sif:IdRefType" />
    <xs:attribute name="SchoolInfoRefId" use="required" type="sif:IdRefType" />
  </xs:complexType>

  <xs:element name="LearnerAttendanceSummary" type="sif:LearnerAttendanceSummaryType">
    <xs:key name="LearnerAttendanceSummaryKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@LearnerPersonalRefId" />
      <xs:field xpath="@SchoolInfoRefId" />
      <xs:field xpath="./sif:SchoolYear" />
      <xs:field xpath="./sif:StartDate" />
      <xs:field xpath="./sif:EndDate" />
    </xs:key>
  </xs:element>

</xs:schema>