<!--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="PersonPictureType">
    <xs:annotation>
      <xs:documentation>This object either contains or references a person's picture.  Compare with US/Canada objects: </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SIF_RefObjectList" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SIF_RefObject">
              <xs:annotation>
                <xs:documentation>The name of a "personal" object that can be requested for this person using the specified PersonRefId.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:token">
                  <xs:enumeration value="ContactPersonal" />
                  <xs:enumeration value="LearnerPersonal" />
                  <xs:enumeration value="WorkforcePersonal" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element ref="sif:SchoolYear" />
      <xs:element name="PictureSource">
        <xs:complexType>
          <xs:annotation>
            <xs:documentation>This element defines the picture. If the Type attribute is URL, this is the location of the picture in [JPEG] format; if Type is JPEG, this is the [JPEG] image data encoded using the Base64 Content-Transfer-Encoding defined in Section 6.8 of [RFC 2045].</xs:documentation>
          </xs:annotation>
          <xs:simpleContent>
            <xs:extension base="sif:URIOrBinaryType">
              <xs:attribute name="Type" use="required">
                <xs:annotation>
                  <xs:documentation>The way the picture is specified (URL or JPEG).</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="URL" />
                    <xs:enumeration value="JPEG" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="OKToPublish" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Can the picture be published?</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="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_ExtendedElementsKey22">
          <xs:selector xpath="./sif:SIF_ExtendedElement" />
          <xs:field xpath="@Name" />
        </xs:key>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="PersonRefId" use="required" type="sif:IdRefType">
      <xs:annotation>
        <xs:documentation>This is the GUID of the person whose picture this is.  It is important to note that using the same GUID a person may have a LearnerPersonal record, a WorkforcePersonal record, and a ContactPersonal record all at the same time.  This same picture is applicable regardless of the associated object type(s).</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="PersonPicture" type="sif:PersonPictureType">
    <xs:key name="PersonPictureKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@PersonRefId" />
    </xs:key>
  </xs:element>

</xs:schema>