<!--
		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="CredentialType">
    <xs:sequence>
      <xs:element name="CredentialRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="CredentialLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="Title" type="xs:normalizedString" />
      <xs:element name="VersionNo" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="Administrator" minOccurs="0" nillable="true" type="ObjectReferenceType" />
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:string" />
      <xs:element name="SubjectAreaList" minOccurs="0" nillable="true" type="SubjectAreaListType" />
      <xs:element name="Status" minOccurs="0" nillable="true" type="NZCodeSetsCredentialStatusType" />
      <xs:element name="PublicationDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="SupercededDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="DiscontinuedDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="Credits" minOccurs="0" nillable="true" type="xs:decimal" />
      <xs:element name="Level" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="RelatedLearningStandardList" minOccurs="0" nillable="true" type="RelatedLearningStandardsListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="Credential" type="CredentialType">
    <xs:key name="CredentialKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./CredentialRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="CredentialCollectionType">
    <xs:sequence>
      <xs:element name="Credential" type="CredentialType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Credentials" type="CredentialCollectionType" />

</xs:schema>