<!--
		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="LearningStandardType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>A curriculum standard or the like published by a national body, professional association or 
      other interested party. The LearningStandard describes a set of learning that students are 
      expected to undertake.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="LearningStandardRefId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The universally unique identifier for the data object record that is used across systems.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearningStandardLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code assigned by the LearningStandard publisher to identify the LearningStandard.  This may
       not uniquely identify the LearningStandard, where there may be multiple editions or versions
       of a particular LearningStandard. The Id of the data object record that was provided by the
       system that the information was originally sourced from.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Title" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The name of the LearningStandard. eg: "Demonstrate understanding of chemical reactivity"</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Number" minOccurs="0" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A unique number that is used to identify the learning standard. One use of this is for NZQA standard numbers which 
        cannot be used as a unique identifier (in LocalId) on their own as they are versioned so are part of a composite key
       with VersionNo.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="VersionNo" minOccurs="0" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The version number of the LearningStandard.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Publisher" minOccurs="0" nillable="true" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the EducationOrganisation that published the LearningStandard</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StandardType" minOccurs="0" nillable="true" type="NZCodeSetsLearningStandardTypeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code denoting the type of LearningStandard.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearningStandardFamily" minOccurs="0" nillable="true" type="NZCodeSetsLearningStandardFamilyType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The family the learning standard is part of.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Description of the standards document.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectAreaList" type="SubjectAreaListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Which standard MoE Learning / Subject Areas is this LearningStandard part of?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Status" minOccurs="0" nillable="true" type="NZCodeSetsLearningStandardStatusType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A code denoting the current status of the LearningStandard, as set by the Publisher.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PublicationDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the publishing organization published the standard.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SupercededDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the publishing organization superceded (or will supercede) 
      the LearningStandard. May be future dated.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DiscontinuedDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The date the publishing organization discontinued (or will discontinue) 
        the LearningStandard.  May be future dated.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Credits" minOccurs="0" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The number of course (or other qualification) credits that will be 
        achieved by passing this LearningStandard.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Level" minOccurs="0" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Where the publisher is NZQA, Which NCEA Level applies to the LearningStandard?</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AssessmentType" minOccurs="0" nillable="true" type="NZCodeSetsAssessmentTypeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Code denoting how the LearningStandard is assessed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RelatedLearningStandardList" minOccurs="0" nillable="true" type="RelatedLearningStandardsListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of related LearningStandard references</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CredentialList" minOccurs="0" nillable="true" type="CredentialListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of Credentials that the learning standard contributes to attaining.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The audit details for a record, e.g. Created/Last Updated DateTime and Created/Last Updated By.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="LearningStandard" type="LearningStandardType">
    <xs:key name="LearningStandardKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./LearningStandardRefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="LearningStandardCollectionType">
    <xs:sequence>
      <xs:element name="LearningStandard" type="LearningStandardType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="LearningStandards" type="LearningStandardCollectionType" />

</xs:schema>