<!--
		SIF Implementation Specification (Australia) 3.4.3


		(April 5, 2018)
		
		Infrastructure Version: v3
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/au/3.4" targetNamespace="http://www.sifassociation.org/datamodel/au/3.4" elementFormDefault="qualified" version="3.4.3">
  <xs:complexType name="StudentPeriodAttendanceType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Extreme</privacyRating>
      </xs:appinfo>
      <xs:documentation>
        This object allows recording of period level attendance for 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="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The GUID of the student that this attendance applies to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolInfoRefId" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <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:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date of the attendance event.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SessionInfoRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The GUID of the session that this attendance applies to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ScheduledActivityRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The GUID of the ScheduledActivity Object attendance applies to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimetablePeriod" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <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:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <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:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The time the student left this class.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AttendanceCode" type="AttendanceCodeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Extreme</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code that describes the absence or attendance</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AttendanceStatus" type="AUCodeSetsAttendanceStatusType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <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="SchoolYearType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <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" type="AuditInfoType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>An audit trail to help determine who entered this attendance event and when.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AttendanceComment" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Extreme</privacyRating>
          </xs:appinfo>
          <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_MetadataType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Extreme</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Extreme</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType">
      <xs:annotation>
        <xs:appinfo>
          <sifChar>M</sifChar>
          <privacyRating>Low</privacyRating>
        </xs:appinfo>
        <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="StudentPeriodAttendanceType">
    <xs:key name="StudentPeriodAttendanceKey1">
      <xs:selector xpath="./StudentPeriodAttendance" />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="StudentPeriodAttendanceCollectionType">
    <xs:sequence>
      <xs:element name="StudentPeriodAttendance" type="StudentPeriodAttendanceType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentPeriodAttendances" type="StudentPeriodAttendanceCollectionType" />

</xs:schema>