<!--
		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="ProviderType">
    <xs:complexContent>
      <xs:extension base="EduOrganisationType">
        <xs:sequence>
          <xs:element name="ProviderRefId" type="MoEOrgIdType" />
          <xs:element name="Authority" minOccurs="0" nillable="true" type="NZCodeSetsProviderAuthorityType" />
          <xs:element name="SchoolService" minOccurs="0" nillable="true" type="SchoolServiceType" />
          <xs:element name="ECEService" minOccurs="0" nillable="true" type="ECEServiceType" />
          <xs:element name="TertiaryService" minOccurs="0" nillable="true" type="TertiaryServiceType" />
          <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:element name="Provider" type="ProviderType">
    <xs:key name="ProviderKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./ProviderRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="ProviderCollectionType">
    <xs:sequence>
      <xs:element name="Provider" type="ProviderType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Providers" type="ProviderCollectionType" />

</xs:schema>