<!--
		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="TimeTableType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>
        The purpose of this object is to define a schedule or Time Table structure/skeleton for the school.  The Time Table is produced by the Time Tabling software.  Once the Time Table is produced, the time tabling software creates the schedule based on business rules and constraints to fit into the time table structure.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SchoolInfoRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Optional, the GUID of the SchoolInfo Object if this object is known in the zone.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolYear" type="SchoolYearType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>
        School year for which the information is applicable, expressed as the four-digit year in which the school year ends (e.g., "2007").
      </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Local TimeTable ID</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>Unique Name of the proposed Time Table</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DaysPerCycle" type="xs:unsignedInt">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Max Number of days per Time Table cycle</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PeriodsPerDay" type="xs:unsignedInt">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Max Number of periods per Time Table Day</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TeachingPeriodsPerDay" minOccurs="0" nillable="true" type="xs:unsignedInt">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Teaching periods per day if different to PeriodsPerDay</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Optional Local School Id</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolName" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The school name in plain text. </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableCreationDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Date Schedule was created or last edited.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StartDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>First day of TimeTable.</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>Last day of the TimeTable.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableDayList" type="TimeTableDayListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>Container for TimeTableDays in Schedule</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>GUID that identifies this  TimeTable object.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="TimeTable" type="TimeTableType">
    <xs:key name="TimeTableKey1">
      <xs:selector xpath="./TimeTable" />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="TimeTableCollectionType">
    <xs:sequence>
      <xs:element name="TimeTable" type="TimeTableType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="TimeTables" type="TimeTableCollectionType" />

</xs:schema>