<!--
		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="ProviderCourseType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>A Provider defined Course that Students enrol in, and may be assessed for, and achieve passes in.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ProviderCourseRefId" minOccurs="0" nillable="true" type="RefIdType">
        <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="ProviderCourseLocalId" minOccurs="0" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>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="Provider" minOccurs="0" type="ProviderObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the Provider (school) that defines and offers the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Curriculum" minOccurs="0" type="NZCodeSetsCurriculumType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Which of New Zealand's three Curricula is covered by the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SubjectAreaList" minOccurs="0" nillable="true" type="SubjectAreaListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Subject matter areas covered by the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="YearLevelList" minOccurs="0" nillable="true" type="YearLevelListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Year Levels covered by the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Title" minOccurs="0" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Title of the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Textual description of the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Duration" minOccurs="0" nillable="true" type="xs:unsignedInt">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The number of weeks the course is taught for.</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 credits awarded upon Course completion.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LanguageOfInstructionList" minOccurs="0" nillable="true" type="LanguageOfInstructionListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The language of instruction for the Course.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NZQAShortCOurseInd" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Indicator to advise NZQA that course does not have sufficient credits for endorsement.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearningStandardList" minOccurs="0" nillable="true" type="LearningStandardListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of references to LearningStandard data objects that students are assessed against as part of the Course</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 ObjectReferences to the Credentials that may be gained by students completing the course.</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="ProviderCourse" type="ProviderCourseType">
    <xs:unique name="ProviderCourseKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./ProviderCourseRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="ProviderCourseCollectionType">
    <xs:sequence>
      <xs:element name="ProviderCourse" type="ProviderCourseType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ProviderCourses" type="ProviderCourseCollectionType" />

</xs:schema>