<!--
		SIF Implementation Specification (Australia) 3.4.3


		(April 5, 2018)
		
		Infrastructure Version: v3
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/au/3.4" targetNamespace="http://www.sifassociation.org/datamodel/au/3.4" elementFormDefault="qualified" version="3.4.3">
  <xs:complexType name="ScheduledActivityType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>
        This object provides a broader range of scheduled activities than just normal teaching classes (as covered by SessionInfo).
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SchoolInfoRefId" minOccurs="0" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The ID (GUID) of the school for which this attendance information is being reported.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableCellRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>An optional Id (GUID) for the timetable cell that this activity is scheduled in. Instances of cyclical classroom sessions will have this element, but one-off events such as excursions will not use this element.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DayId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Day Id.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PeriodId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Period Id within the Day Id</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The GUID of the TimeTable to which this Cell belongs</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityDate" minOccurs="0" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Date for which the activity is scheduled. This element is mandatory even if the object is used for preplanning excursions: a tentative or notional date and time should be provided if a finalised date is not available.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StartTime" minOccurs="0" type="xs:time">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Starting time for activity. This element is mandatory even if the object is used for preplanning excursions: a tentative or notional date and time should be provided if a finalised date is not available.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FinishTime" minOccurs="0" type="xs:time">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Finish time for activity. This element is mandatory even if the object is used for preplanning excursions: a tentative or notional date and time should be provided if a finalised date is not available.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CellType" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Type of Lesson/Session eg Teaching, Lunch etc.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableSubjectRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Optional to link the GUID of the Subject, if this is a piece of curriculum being scheduled.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TeacherList" minOccurs="0" nillable="true" type="ScheduledTeacherListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A listing of the teachers assigned to the activity, and the type of supervision they are credited with. If no teachers are listed, the activity is assumed to be unsupervised.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RoomList" minOccurs="0" nillable="true" type="RoomListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>List of rooms in which the scheduled activity is held. Used for onsite venues which are represented in the source system as rooms. Can include large venues (ovals, library, etc), if they have been represented as rooms; source system practice varies.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AddressList" minOccurs="0" nillable="true" type="AddressListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The address(es) associated with the scheduled activity.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Location" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Text description of venue. Can be used for either onsite or offsite venues. Can be used if neither RoomList nor AddressList is appropriate or supported by the source system. (E.g. the venue is the oval, which is not represented as a room; the venue is a specific part of the park). If RoomList, AddressList, and Location conflict, the order of priority in interpreting the object is RoomList, then AddressList, then Location.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityType" minOccurs="0" nillable="true" type="AUCodeSetsScheduledActivityTypeType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The type of activity undertaken.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityName" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>This element is required if this is a one-off event, i.e. there is no TimeTableCellRefId provided, in order for excursions to be uniquely identified.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ActivityComment" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Allows free-text information, e.g. for excursions. Comment should not be used to identify the location of the venue, since the contents of Comment are open-ended..</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentList" minOccurs="0" nillable="true" type="StudentsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Students who are scheduled to attend the event. Not required for cyclical events, as this would be expected to be provided from TimeTableCell/TeachingGroup instead.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TeachingGroupList" minOccurs="0" nillable="true" type="TeachingGroupListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Teaching groups which are scheduled to attend the event. Not required for cyclical events, as this would be expected to be provided from TimeTableCell/TeachingGroup instead.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="YearLevels" minOccurs="0" nillable="true" type="YearLevelsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>List of year levels offered by the school.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Override" minOccurs="0" nillable="true" type="ScheduledActivityOverrideType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>This flag should be used to indicate whether or not this ScheduledActivity overrides a previous ScheduledActivity. In any initial provisioning this element should NOT be provided.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="SIF_MetadataType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType">
      <xs:annotation>
        <xs:appinfo>
          <sifChar>M</sifChar>
          <privacyRating>Low</privacyRating>
        </xs:appinfo>
        <xs:documentation>The GUID of the Object</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="ScheduledActivity" type="ScheduledActivityType">
    <xs:unique name="ScheduledActivityKey1">
      <xs:selector xpath="./ScheduledActivity" />
      <xs:field xpath="@RefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="ScheduledActivityCollectionType">
    <xs:sequence>
      <xs:element name="ScheduledActivity" type="ScheduledActivityType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ScheduledActivitys" type="ScheduledActivityCollectionType" />

</xs:schema>