<?xml version="1.0" ?>
<schema
	targetNamespace="http://www.angel.ac.uk/UKeduPerson/"
	xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:ukep="http://www.angel.ac.uk/UKeduPerson/"
	elementFormDefault="unqualified"
	attributeFormDefault="unqualified"
	version="1.0">
  <annotation>
    <documentation>
	UKeduPerson XML Specification
	See http://www.angel.ac.uk/UKeduPerson/UKeduPersonSchema.pdf for more information describing and restricting usage

	History:
	Version 1.0 18 June 2004, Simon McLeish (ukeduperson@angel.ac.uk)
    </documentation>
  </annotation>

<!-- element definitions -->
<!-- remember that default for minOccurs and maxOccurs is 1 -->
<!-- UKeduPerson -->
<element name="UKeduPerson">
  <complexType>
    <!-- this sets an optional institution followed by either an individual or a category followed by any number of categories -->
    <sequence>
      <element ref="institution" minOccurs="0" />
      <choice>
	<element ref="individual" />
	<element ref="categoryGroup" />
      </choice>
      <element ref="categoryGroup" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
    <attribute name="version" type="ukep:versionType" use="required" />
    <attribute name="language" type="string" />
  </complexType>
</element>

<!-- institution -->
<element name="institution">
  <complexType mixed="true">
    <sequence>
      <!-- postalAddress -->
      <element name="postalAddress" type="string" />
    </sequence>
    <attribute name="ldapURI" type="string" />
    <attribute name="securityDomain" type="string" use="required" />
    <attribute name="telephoneNo" type="string" />
    <attribute name="facsimileNo" type="string" />
    <attribute name="contactEmail" type="string" />
    <attribute name="mainURI" type="string" />
    <attribute name="staffListURI" type="string" />
    <attribute name="libraryPortalURI" type="string" />
    <attribute name="admissionsURI" type="string" />
    <attribute name="libraryCatalogueURI" type="string" />
  </complexType>
</element>

<!-- individual -->
<element name="individual">
  <complexType>
    <sequence>
      <element ref="standardisedIdentifier" />
      <!-- eduPersonNickname -->
      <element name="eduPersonNickname" type="string" minOccurs="0" />

      <!-- description -->
      <element name="description" type="string" minOccurs="0" />

      <!-- displayName -->
      <element name="displayName" type="string" minOccurs="0" />

      <!-- facsimileTelephoneNumber -->
      <element name="facsimileTelephoneNumber" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- homePhone -->
      <element name="homePhone" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- homePostalAddress -->
      <element name="homePostalAddress" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- jpegPhoto -->
      <element name="jpegPhoto" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- mobile -->
      <element name="mobile" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- pager -->
      <element name="pager" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- postalAddress -->
      <element name="postalAddress" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- postalCode -->
      <element name="postalCode" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- postOfficeBox -->
      <element name="postOfficeBox" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- telephoneNumber -->
      <element name="telephoneNumber" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- userCertificate -->
      <element name="userCertificate" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- userPassword -->
      <element name="userPassword" type="string" minOccurs="0" maxOccurs="unbounded" />

      <!-- userSMIMECertificate -->
      <element name="userSMIMECertificate" type="string" minOccurs="0" maxOccurs="unbounded" />

    </sequence>
    <attribute name="givenName" type="string" />
    <attribute name="initials" type="string" />
    <attribute name="labeledURI" type="string" />
    <attribute name="mail" type="string" />
    <attribute name="manager" type="string" />
    <attribute name="preferredLanguage" type="string" />
    <attribute name="seeAlso" type="string" />
    <attribute name="sn" type="string" />
    <attribute name="street" type="string" />
    <attribute name="title" type="string" />
    <attribute name="uid" type="string" />
    <attribute name="uniqueIdentifier" type="string" />
    <attribute name="x500uniqueIdentifier" type="string" />
    <attribute name="eduPersonTargetedID" type="string" />
  </complexType>
</element>

<!-- standardisedIdentifier -->
<element name="standardisedIdentifier">
  <complexType mixed="true">
    <attribute name="form" type="string" />
  </complexType>
</element>

<!-- categoryGroup -->
<element name="categoryGroup">
  <complexType>
    <sequence maxOccurs="unbounded">
      <element ref="categoryGroup" minOccurs="0" maxOccurs="unbounded" />
      <element ref="category" maxOccurs="unbounded" />
    </sequence>
  </complexType>
</element>

<!-- category -->
<element name="category">
  <complexType>
    <sequence>
      <element ref="categoryValue" maxOccurs="unbounded" />
    </sequence>
    <attribute name="type" type="string" use="required" />
    <attribute name="subtype" type="string" />
    <attribute name="coding" type="string" />
    <attribute name="uri" type="string" />
    <attribute name="furtherInfo" type="string" />
  </complexType>
</element>

<!-- categoryValue -->
<element name="categoryValue">
  <complexType>
    <simpleContent>
      <extension base="string">
        <attribute name="encodedValue" type="string" />
      </extension>
    </simpleContent>
  </complexType>
</element>
<!-- end of element definitions -->

<!-- type definitions -->
<!-- versionType: restrict version number -->
<simpleType name="versionType">
  <restriction base="decimal">
    <enumeration value="1.0" />
  </restriction>
</simpleType>
<!-- end of type definitions -->
</schema>

