<!--
		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="TeachingGroupEventType">
    <xs:sequence>
      <xs:element name="TeachingGroupEventRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="TeachingGroupEventLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Provider" type="ProviderObjectReferenceType" />
      <xs:element name="TeachingGroup" type="ObjectReferenceType" />
      <xs:element name="Schedule" type="ObjectReferenceType" />
      <xs:element name="SchedulePeriod" type="ObjectReferenceType" />
      <xs:element name="AcademicDay" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="RoomId" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="RoomName" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="TakeAttendanceFlag" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="TeacherList" minOccurs="0" nillable="true" type="StaffListType" />
      <xs:element name="CourseList" minOccurs="0" nillable="true" type="CourseListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="TeachingGroupEvent" type="TeachingGroupEventType">
    <xs:key name="TeachingGroupEventKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./TeachingGroupEventRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="TeachingGroupEventCollectionType">
    <xs:sequence>
      <xs:element name="TeachingGroupEvent" type="TeachingGroupEventType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="TeachingGroupEvents" type="TeachingGroupEventCollectionType" />

</xs:schema>