<!--
		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="StudentActivityParticipationType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating />
      </xs:appinfo>
      <xs:documentation>
      This object provides information on a co-curricular or extra-curricular activity in which a student participates during a given school year.
    </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StudentActivityParticipationRefId" 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="StudentActivityParticipationLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</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="Student" minOccurs="0" type="StudentObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Generic object reference to the student participating in the activity. </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 running the activity the student is participating in, e.g. schools.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityGroup" minOccurs="0" nillable="true" type="NZCodeSetsStudentActivityGroupType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Standard codes denoting the group of the activity the student is participating in, e.g. sport, art, cultural, music.
      </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityType" minOccurs="0" nillable="true" type="NZCodeSetsStudentActivityTypeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Standard codes denoting the type of activity the student is participating in, e.g. rugby, drama, Kapa Haka, Violin.
      </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityName" minOccurs="0" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The name of the activity the student participated in.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LearningArea" minOccurs="0" nillable="true" type="NZCodeSetsLearningAreaType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The learning area the student activity the student is participating in relates to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ParticipationComment" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Comment related to the student's participation in the activity. </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StartDate" minOccurs="0" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>This is the date from which the activity participation is valid (inclusive). </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>This is the date through which the activity participation is
      valid (inclusive). If element is supported by the
      publisher/responder, should contain a date if the student
      withdraws from the activity before the end of the school
      year. </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Role" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Specific role the student plays in the activity (e.g., band leader, student body president). </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecognitionList" minOccurs="0" nillable="true" type="RecognitionListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>List of awards and other types of recognition given to the student for this activity. </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="StudentActivityParticipation" type="StudentActivityParticipationType">
    <xs:unique name="StudentActivityParticipationKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StudentActivityParticipationRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StudentActivityParticipationCollectionType">
    <xs:sequence>
      <xs:element name="StudentActivityParticipation" type="StudentActivityParticipationType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StudentActivityParticipations" type="StudentActivityParticipationCollectionType" />

</xs:schema>