<!--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="WorkforcePersonalType">
    <xs:annotation>
      <xs:documentation>This object contains key personal information relating to a workforce member, who might be a teacher or other employee of the school or LA.  Compare with US/Canada objects: </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element ref="sif:LocalId" />
      <xs:element name="AlertMsgList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="AlertMsg" 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" 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" />
      <xs:element name="TeacherNumber" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The DfES Teacher Reference number. For those who have one this is a unique number.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NINumber" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:normalizedString">
            <xs:annotation>
              <xs:documentation>National Insurance Number. Do not specify temporary numbers. Format:  AAnnnnnnA</xs:documentation>
            </xs:annotation>
            <xs:pattern value="[A-Z]{2}[0-9]{6}[A-Z]" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CurrentAssignmentList" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CurrentAssignment" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="LAId" minOccurs="0" nillable="true" type="sif:LAIdType">
                    <xs:annotation>
                      <xs:documentation>The DfES assigned number for the LA in which the workforce member is working, if associated.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="EstablishmentId" minOccurs="0" nillable="true" type="sif:EstablishmentIdType">
                    <xs:annotation>
                      <xs:documentation>The DfES assigned number for the school or establishment in which the workforce member is working.  Note that the school may not necessarily be in the same LA listed as the LAId.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Posts" minOccurs="0" nillable="true">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Post" maxOccurs="unbounded" type="sif:UKAssignmentPostType">
                          <xs:annotation>
                            <xs:documentation>The post assigned to the workforce member in the context of the school or LA.</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </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:key name="SIF_ExtendedElementsKey27">
          <xs:selector xpath="./sif:SIF_ExtendedElement" />
          <xs:field xpath="@Name" />
        </xs:key>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>The ID (GUID) of the workforce member.  Note that the same GUID may be assigned to this person when they are also a learner (via LearnerPersonal) and/or a contact (via ContactPersonal).</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="WorkforcePersonal" type="sif:WorkforcePersonalType">
    <xs:key name="WorkforcePersonalKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

</xs:schema>