<!--
		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="StudentPersonalType">
    <xs:sequence>
      <xs:element name="StudentPersonalRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="StudentPersonalLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="NationalStudentNumber" minOccurs="0" type="xs:positiveInteger" />
      <xs:element name="NZQAStudentId" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="FirstNZSchoolingDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="EarlyChildhoodEducation" minOccurs="0" nillable="true" type="EarlyChildhoodEducationType" />
      <xs:element name="PersonInfo" minOccurs="0" type="PersonInfoType" />
      <xs:element name="BiographicChangeReason" minOccurs="0" nillable="true" type="NZCodeSetsBiographicChangeReasonType" />
      <xs:element name="CustodyNote" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="StudentPersonal" type="StudentPersonalType">
    <xs:unique name="StudentPersonalKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentPersonalRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StudentPersonalCollectionType">
    <xs:sequence>
      <xs:element name="StudentPersonal" type="StudentPersonalType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentPersonals" type="StudentPersonalCollectionType" />

</xs:schema>