<!--
		SIF Implementation Specification (Australia) 1.1 (December 23, 2010) Infrastructure Version: 2.4-16
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/au/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/au/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="StudentPeriodAttendanceType">
    <xs:annotation>
      <xs:documentation>
        This object allows recording of period level attendance a student.

        The Australian StudentPeriodAttendance object differs to the US StudentPeriodAttendance object in the following ways:
        Student Period Attendance object is usually linked to a SessionInfo object (see below), but it is possible, for simple period attendance packages, to not link period attendance to a session or timetable.There will be one provider of the StudentPeriodAttendance within a SIF Zone in Australia.  The US, in contrast, has specified objects and events to allow for multiple providers of the StudentPeriodAttendance object in a zone.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentPersonalRefId" type="sif:IdRefType">
        <xs:annotation>
          <xs:documentation>The GUID of the student that this attendance applies to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolInfoRefId" type="sif:IdRefType">
        <xs:annotation>
          <xs:documentation>The school where the attendance was recorded.  Somewhat redundant, needed for requests.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Date" type="xs:date">
        <xs:annotation>
          <xs:documentation>The date of the attendance event.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SessionInfoRefId" minOccurs="0" nillable="true" type="sif:IdRefType">
        <xs:annotation>
          <xs:documentation>The GUID of the session that this attendance applies to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimetablePeriod" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The period within which attendance is being reported, e.g. "4D".</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeIn" minOccurs="0" nillable="true" type="xs:time">
        <xs:annotation>
          <xs:documentation>The time the student entered or returned to this class.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeOut" minOccurs="0" nillable="true" type="xs:time">
        <xs:annotation>
          <xs:documentation>The time the student left this class.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element ref="sif:AttendanceCode" />
      <xs:element name="AttendanceStatus" type="sif:AUCodeSetsAttendanceStatusType">
        <xs:annotation>
          <xs:documentation>Approved or Unapproved status of this attendance code.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolYear" minOccurs="0" nillable="true" type="sif:SchoolYearType">
        <xs:annotation>
          <xs:documentation>
        School year for which this enrollment is applicable, expressed as the four-digit year in which the school year
        ends (e.g. 2007).
      </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AuditInfo" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CreationUser">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="UserId" type="xs:normalizedString">
                    <xs:annotation>
                      <xs:documentation>Unique identifier of the user that created the attendance record.  This will depend on the user and the source.  The preferred identifier would be a RefId for a StaffPersonal, StudentContact, or StudentPersonal Object.  However, the user may not be associated with any of these SIF objects.  In that case a unique Id given by the source should be used.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="Type" use="required">
                  <xs:annotation>
                    <xs:documentation>The role of the staff member for that created this attendance record.</xs:documentation>
                  </xs:annotation>
                  <xs:simpleType>
                    <xs:restriction base="xs:token">
                      <xs:enumeration value="Office Staff" />
                      <xs:enumeration value="School Admin" />
                      <xs:enumeration value="Parent" />
                      <xs:enumeration value="Nurse" />
                      <xs:enumeration value="Teacher" />
                      <xs:enumeration value="Other" />
                    </xs:restriction>
                  </xs:simpleType>
                </xs:attribute>
              </xs:complexType>
            </xs:element>
            <xs:element name="CreationDateTime" type="xs:dateTime">
              <xs:annotation>
                <xs:documentation>The date and time of this attendance record was created.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="AttendanceComment" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:documentation>This element contains the comments that are relevant to this attendance record.</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_ExtendedElementsKey30">
          <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) assigned to uniquely identify this attendance record.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="StudentPeriodAttendance" type="sif:StudentPeriodAttendanceType">
    <xs:key name="StudentPeriodAttendanceKey1">
      <xs:selector xpath="." />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

</xs:schema>