<!--
		SIF Implementation Specification (New Zealand) 3.1
		(8 December, 2020
)
		
		Infrastructure Version: v3.1
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/nz/3.1" targetNamespace="http://www.sifassociation.org/datamodel/nz/3.1" elementFormDefault="qualified" version="3.1 (rc 5)">
  <xs:complexType name="StudentAttendanceSummaryType">
    <xs:sequence>
      <xs:element name="StudentAttendanceSummaryRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="StudentAttendanceSummaryLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Student" minOccurs="0" type="StudentObjectReferenceType" />
      <xs:element name="Provider" minOccurs="0" type="ProviderObjectReferenceType" />
      <xs:element name="SchoolCalendarYear" minOccurs="0" type="xs:gYear" />
      <xs:element name="StartDate" minOccurs="0" type="xs:date" />
      <xs:element name="EndDate" minOccurs="0" type="xs:date" />
      <xs:element name="StartDay" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="EndDay" minOccurs="0" nillable="true" type="xs:unsignedInt" />
      <xs:element name="FTE" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="0" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:maxInclusive value="1" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            <xs:fractionDigits value="2" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="AttendancePercentageHalfDays" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="AttendanceUnjustifiedHalfDays" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearPresent" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearAbsent" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearJustified" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearTotal" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearIntermittantUnjustified" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearPercentagePresent" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="HalfDaysYearUnjustified" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="StudentAttendanceSummary" type="StudentAttendanceSummaryType">
    <xs:unique name="StudentAttendanceSummaryKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentAttendanceSummaryRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StudentAttendanceSummaryCollectionType">
    <xs:sequence>
      <xs:element name="StudentAttendanceSummary" type="StudentAttendanceSummaryType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentAttendanceSummarys" type="StudentAttendanceSummaryCollectionType" />

</xs:schema>