<!--
		SIF Implementation Specification (Australia) 1.1 (December 23, 2010) Infrastructure Version: 2.4-16
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/au/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/au/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="TimeTableType">
    <xs:annotation>
      <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="sif:IdRefType">
        <xs:annotation>
          <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 ref="sif:SchoolYear" />
      <xs:element name="LocalId" minOccurs="0" nillable="true" type="sif:LocalIdType">
        <xs:annotation>
          <xs:documentation>Local TimeTable ID</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Title" type="xs:normalizedString">
        <xs:annotation>
          <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: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: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:documentation>Teaching periods per day if different to PeriodsPerDay</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolLocalId" minOccurs="0" nillable="true" type="sif:LocalIdType">
        <xs:annotation>
          <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: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: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: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:documentation>Last day of the TimeTable.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeTableDayList">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TimeTableDay" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DayId" type="sif:LocalIdType">
                    <xs:annotation>
                      <xs:documentation>Local Time Table Identifier</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="DayTitle" type="xs:normalizedString">
                    <xs:annotation>
                      <xs:documentation />
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TimeTablePeriodList">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="TimeTablePeriod" maxOccurs="unbounded">
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="PeriodId" type="sif:LocalIdType">
                                <xs:annotation>
                                  <xs:documentation>Period in Day Identifier</xs:documentation>
                                </xs:annotation>
                              </xs:element>
                              <xs:element name="PeriodTitle" type="xs:normalizedString">
                                <xs:annotation>
                                  <xs:documentation>Title of Period eg. Session 1 or Period 1</xs:documentation>
                                </xs:annotation>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType">
        <xs:key name="SIF_ExtendedElementsKey34">
          <xs:selector xpath="./sif:SIF_ExtendedElement" />
          <xs:field xpath="@Name" />
        </xs:key>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>GUID that identifies this  TimeTable object.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

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

</xs:schema>