<!--
		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="SystemRoleType">
    <xs:sequence>
      <xs:element name="SIF_RefId" minOccurs="0">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="IdRefTypeOrEmpty">
              <xs:attribute name="SIF_RefObject" use="required">
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="Identity" />
                    <xs:enumeration value="StudentPersonal" />
                    <xs:enumeration value="StaffPersonal" />
                    <xs:enumeration value="StudentContactPersonal" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="SystemContextList" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SystemContext" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="RoleList" minOccurs="0" nillable="true">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Role" minOccurs="0" maxOccurs="unbounded">
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="RoleScopeList" minOccurs="0" nillable="true">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="RoleScope" minOccurs="0" maxOccurs="unbounded">
                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element name="RoleScopeName" minOccurs="0" nillable="true" type="xs:normalizedString" />
                                          <xs:element name="RoleScopeRefId" minOccurs="0" nillable="true">
                                            <xs:complexType>
                                              <xs:simpleContent>
                                                <xs:extension base="IdRefTypeOrEmpty">
                                                  <xs:attribute name="SIF_RefObject" use="required">
                                                    <xs:simpleType>
                                                      <xs:restriction base="xs:token">
                                                        <xs:enumeration value="SchoolInfo" />
                                                        <xs:enumeration value="TeachingGroup" />
                                                        <xs:enumeration value="StudentActivityParticipation" />
                                                      </xs:restriction>
                                                    </xs:simpleType>
                                                  </xs:attribute>
                                                </xs:extension>
                                              </xs:simpleContent>
                                            </xs:complexType>
                                          </xs:element>
                                        </xs:sequence>
                                      </xs:complexType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                            <xs:attribute name="RoleId" use="required" type="xs:normalizedString" />
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
                <xs:attribute name="SystemId" use="required" type="xs:normalizedString" />
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType" />
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType" />
  </xs:complexType>

  <xs:element name="SystemRole" type="SystemRoleType">
    <xs:unique name="SystemRoleKey1">
      <xs:selector xpath="./SystemRole" />
      <xs:field xpath="@RefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="SystemRoleCollectionType">
    <xs:sequence>
      <xs:element name="SystemRole" type="SystemRoleType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="SystemRoles" type="SystemRoleCollectionType" />

</xs:schema>