<!--
		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="SIF_LogEntryType">
    <xs:annotation>
      <xs:documentation>
        This object captures an occurrence within a SIF node (ZIS or agent)—error, warning or information—for storage in an optionally provided zone log.
        SIF_LogEntry Adds are reported and are used to post new log entries to the provider of the log.
        Of course, subscribing agents may also filter incoming Adds as part of their own logging mechanism.
        Any Change or Delete SIF_Events should be ignored at the agent level, but should be routed by the
        ZIS (though this should not be necessary). Use of the log is optional and voluntary, except where noted as mandatory in this specification.
        Nodes may post as much or as little log data as required with the expectation that if there is a provider of SIF_LogEntry that the logged entries be available
        for a provider-defined amount of time subject to provider-defined restrictions on the quantity of data
        logged by any given node.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SIF_LogEntryHeader">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sif:SIF_Header" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_OriginalHeader" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sif:SIF_Header" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Category" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A SIF_LogEntry category. May be omitted for informational-type postings, where typically a textual description will suffice.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Success</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Data Issues with Success Result</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="3">
              <xs:annotation>
                <xs:documentation>Data Issues with Failure Result</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="4">
              <xs:annotation>
                <xs:documentation>Error Conditions</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_Code" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A SIF_LogEntry code with regard to SIF_Category above. May be omitted for informational-type postings, where typically a textual description will suffice. If a SIF_Code is included, SIF_Category must be included as well.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntrySuccessCategoryType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryDataIssuesWithSuccessResultType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryDataIssuesWithFailureResultType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryAgentErrorConditionType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryZISErrorConditionType" />
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_ApplicationCode" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:normalizedString">
            <xs:annotation>
              <xs:documentation>
        An error code specific to the application posting the entry.
        Can be used by vendors to query log entries for errors specific to their applications.
        If a SIF_ApplicationCode is included, SIF_Category must be included as well;
        i.e., application-specific error codes should fall within one of the defined log entry categories.
      </xs:documentation>
            </xs:annotation>
            <xs:maxLength value="64" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_Desc">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:annotation>
              <xs:documentation>A textual description of the error.</xs:documentation>
            </xs:annotation>
            <xs:maxLength value="1024" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_ExtendedDesc" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation>Any extended error description.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_LogObjects" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SIF_LogObject" maxOccurs="unbounded">
              <xs:complexType>
                <xs:annotation>
                  <xs:documentation>Any SIF data objects to which this log entry may apply.</xs:documentation>
                </xs:annotation>
                <xs:complexContent>
                  <xs:extension base="sif:SIF_LogEntryExtendedContentType">
                    <xs:attribute name="ObjectName" use="required" type="sif:SIF_RequestObjectNamesType">
                      <xs:annotation>
                        <xs:documentation>The name of the SIF object referenced (e.g. StudentPersonal).</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                  </xs:extension>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element ref="sif:SIF_Metadata" minOccurs="0" />
      <xs:element ref="sif:SIF_ExtendedElements" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="Source" use="required">
      <xs:annotation>
        <xs:documentation>The SIF node that logged this entry.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Agent" />
          <xs:enumeration value="ZIS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LogLevel" use="required">
      <xs:annotation>
        <xs:documentation>The level of the log entry herein described.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Info" />
          <xs:enumeration value="Warning" />
          <xs:enumeration value="Error" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="SIF_LogEntry" type="sif:SIF_LogEntryType" />

  <xs:complexType name="SIF_LogEntryInfrastructureType">
    <xs:annotation>
      <xs:documentation>
        This object captures an occurrence within a SIF node (ZIS or agent)—error, warning or information—for storage in an optionally provided zone log.
        SIF_LogEntry Adds are reported and are used to post new log entries to the provider of the log.
        Of course, subscribing agents may also filter incoming Adds as part of their own logging mechanism.
        Any Change or Delete SIF_Events should be ignored at the agent level, but should be routed by the
        ZIS (though this should not be necessary). Use of the log is optional and voluntary, except where noted as mandatory in this specification.
        Nodes may post as much or as little log data as required with the expectation that if there is a provider of SIF_LogEntry that the logged entries be available
        for a provider-defined amount of time subject to provider-defined restrictions on the quantity of data
        logged by any given node.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="SIF_LogEntryHeader">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sif:SIF_Header" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_OriginalHeader" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sif:SIF_Header" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Category" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A SIF_LogEntry category. May be omitted for informational-type postings, where typically a textual description will suffice.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Success</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Data Issues with Success Result</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="3">
              <xs:annotation>
                <xs:documentation>Data Issues with Failure Result</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="4">
              <xs:annotation>
                <xs:documentation>Error Conditions</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_Code" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A SIF_LogEntry code with regard to SIF_Category above. May be omitted for informational-type postings, where typically a textual description will suffice. If a SIF_Code is included, SIF_Category must be included as well.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntrySuccessCategoryType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryDataIssuesWithSuccessResultType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryDataIssuesWithFailureResultType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryAgentErrorConditionType" />
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="sif:SIF_LogEntryZISErrorConditionType" />
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_ApplicationCode" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:normalizedString">
            <xs:annotation>
              <xs:documentation>
        An error code specific to the application posting the entry.
        Can be used by vendors to query log entries for errors specific to their applications.
        If a SIF_ApplicationCode is included, SIF_Category must be included as well;
        i.e., application-specific error codes should fall within one of the defined log entry categories.
      </xs:documentation>
            </xs:annotation>
            <xs:maxLength value="64" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_Desc">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:annotation>
              <xs:documentation>A textual description of the error.</xs:documentation>
            </xs:annotation>
            <xs:maxLength value="1024" xmlns:xs="http://www.w3.org/2001/XMLSchema" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="SIF_ExtendedDesc" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation>Any extended error description.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_LogObjects" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SIF_LogObject" maxOccurs="unbounded">
              <xs:complexType>
                <xs:annotation>
                  <xs:documentation>Any SIF data objects to which this log entry may apply.</xs:documentation>
                </xs:annotation>
                <xs:complexContent>
                  <xs:extension base="sif:SIF_LogEntryExtendedContentType">
                    <xs:attribute name="ObjectName" use="required" type="sif:SIF_RequestObjectNamesType">
                      <xs:annotation>
                        <xs:documentation>The name of the SIF object referenced (e.g. StudentPersonal).</xs:documentation>
                      </xs:annotation>
                    </xs:attribute>
                  </xs:extension>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element ref="sif:SIF_Metadata" minOccurs="0" />
      <xs:element ref="sif:SIF_ExtendedElements" minOccurs="0" />
    </xs:sequence>
    <xs:attribute name="Source" use="required">
      <xs:annotation>
        <xs:documentation>The SIF node that logged this entry.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Agent" />
          <xs:enumeration value="ZIS" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LogLevel" use="required">
      <xs:annotation>
        <xs:documentation>The level of the log entry herein described.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Info" />
          <xs:enumeration value="Warning" />
          <xs:enumeration value="Error" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

</xs:schema>