<!--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="SchoolGroupTypeType">
    <xs:annotation>
      <xs:documentation>This object describes a high-level course or class grouping organised and/or taught within a school or establishment.  Note that not all courses are based upon a subject area.  One such course is "Class Group" which is the same as a homeroom or registration group.  Compare with US/Canada object: </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Code" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The school defined local code for the group (or course).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Title" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Title associated with this group.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Textual description for the group.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectAreaList" minOccurs="0" nillable="true" type="sif:SubjectAreaListType">
        <xs:annotation>
          <xs:documentation>Subject matter areas taught as part of the course, if any.</xs:documentation>
        </xs:annotation>
      </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_ExtendedElementsKey23">
          <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 GUID that uniquely identifies a school course.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="SchoolInfoRefId" use="required" type="sif:IdRefType">
      <xs:annotation>
        <xs:documentation>The ID (GUID) that references the school or establishment where the course is offered or the registration group exists.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="SchoolYear" use="required" type="sif:SchoolYearType">
      <xs:annotation>
        <xs:documentation>School year for which the information is applicable, expressed as the four-digit year in which the school year ends (e.g. 2007 for the 2006/07 school year). Where a group membership is valid across multiple years, the current year at the time of publication will be used.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="GroupType" use="required">
      <xs:annotation>
        <xs:documentation>The group type.  Teaching groups are used to teach subjects while other groups are organised for various other reasons.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="G">
            <xs:annotation>
              <xs:documentation>Generic Group</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="R">
            <xs:annotation>
              <xs:documentation>Registration/Class Group</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="T">
            <xs:annotation>
              <xs:documentation>Teaching (course) Group</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="SchoolGroupType" type="sif:SchoolGroupTypeType">
    <xs:key name="SchoolGroupTypeKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

</xs:schema>