91487b32b21db4ad049f7507af8dde75a3bb1cc5
[java-idp.git] / src / schemas / eduPerson.xsd
1 <?xml version="1.0" encoding="US-ASCII"?>
2 <schema targetNamespace="urn:mace:eduPerson:1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:edu="urn:mace:eduPerson:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
3     <!--
4     Attribute Identifiers:
5     
6     urn:mace:eduPerson:1.0:eduPersonPrincipalName
7         - AttributeValue xsi:type is eduPersonPrincipalNameType
8         - AttributeValue element contains the LHS of the eduPerson-defined EPPN
9         - Scope, if any, contains the RHS of the eduPerson-defined EPPN
10         - MUST be singly occurring value
11     
12     urn:mace:eduPerson:1.0:eduPersonAffiliation
13         - AttributeValue xsi:type is eduPersonAffiliationType
14         - AttributeValue elements contain an eduPerson-defined affiliation token
15         - Scope, if any, contains a DNS-style organization name
16         - MAY be multi-valued
17     
18     urn:mace:eduPerson:1.0:eduPersonPrimaryAffiliation
19         - AttributeValue xsi:type is eduPersonAffiliationType
20         - AttributeValue element contains an eduPerson-defined affiliation token
21         - Scope, if any, contains a DNS-style organization name
22         - MUST be singly occurring value
23     
24     urn:mace:eduPerson:1.0:eduPersonEntitlement
25         - AttributeValue xsi:type is xsd:anyURI
26         - AttributeValue elements contain a URI representing the entitlement
27         - MAY be multi-valued
28     -->
29     <complexType name="ScopedStringValueType">
30         <simpleContent>
31             <extension base="string">
32                 <attribute name="Scope" type="string" use="optional"/>
33             </extension>
34         </simpleContent>
35     </complexType>
36     <complexType name="eduPersonPrincipalNameType">
37         <simpleContent>
38             <restriction base="edu:ScopedStringValueType">
39                 <pattern value="[^\s@]+"/>
40                 <attribute name="Scope" type="string" use="optional"/>
41             </restriction>
42         </simpleContent>
43     </complexType>
44     <complexType name="eduPersonAffiliationType">
45         <simpleContent>
46             <restriction base="edu:ScopedStringValueType">
47                 <enumeration value="faculty"/>
48                 <enumeration value="student"/>
49                 <enumeration value="staff"/>
50                 <enumeration value="alum"/>
51                 <enumeration value="member"/>
52                 <enumeration value="affiliate"/>
53                 <enumeration value="employee"/>
54                 <attribute name="Scope" type="string" use="optional"/>
55             </restriction>
56         </simpleContent>
57     </complexType>
58     <simpleType name="ValueType">
59         <restriction base="string">
60             <enumeration value="literal"/>
61             <enumeration value="regexp"/>
62             <enumeration value="xpath"/>
63         </restriction>
64     </simpleType>
65     <complexType name="SiteRuleType">
66         <sequence>
67             <element name="Value" maxOccurs="unbounded">
68                 <complexType>
69                     <simpleContent>
70                         <extension base="string">
71                             <attribute name="Type" type="edu:ValueType" use="optional" default="literal"/>
72                         </extension>
73                     </simpleContent>
74                 </complexType>
75             </element>
76         </sequence>
77     </complexType>
78     <element name="AnySite" type="edu:SiteRuleType"/>
79     <element name="SiteRule">
80         <complexType>
81             <complexContent>
82                 <extension base="edu:SiteRuleType">
83                     <attribute name="Name" type="string" use="required"/>
84                 </extension>
85             </complexContent>
86         </complexType>
87     </element>
88     <complexType name="AttributeRuleType">
89         <sequence>
90             <element ref="edu:AnySite" minOccurs="0"/>
91             <element ref="edu:SiteRule" minOccurs="0" maxOccurs="unbounded"/>
92         </sequence>
93         <attribute name="Name" type="anyURI"/>
94     </complexType>
95     <element name="AttributeRule" type="edu:AttributeRuleType">
96         <key name="SiteRuleKey">
97             <selector xpath="./edu:SiteRule"/>
98             <field xpath="@Name"/>
99         </key>
100     </element>
101     <element name="AttributeAcceptancePolicy">
102         <complexType>
103             <sequence>
104                 <element ref="edu:AttributeRule" maxOccurs="unbounded"/>
105             </sequence>
106         </complexType>
107         <key name="AttributeNameKey">
108             <selector xpath="./edu:AttributeRule"/>
109             <field xpath="@Name"/>
110         </key>
111     </element>
112 </schema>