Fix backslashes in SHIBSP_PREFIX variable by manually creating it during the script...
[shibboleth/sp.git] / schemas / shibboleth-2.0-afp-mf-basic.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <schema targetNamespace="urn:mace:shibboleth:2.0:afp:mf:basic"
4     xmlns="http://www.w3.org/2001/XMLSchema"
5     xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"
6     xmlns:afp="urn:mace:shibboleth:2.0:afp"
7     elementFormDefault="qualified">
8
9     <import namespace="urn:mace:shibboleth:2.0:afp" schemaLocation="classpath:/schema/shibboleth-2.0-afp.xsd" />
10
11     <!-- Blanket Match Function -->
12     <complexType name="ANY">
13         <annotation>
14             <documentation>A match function that evaluates to true.</documentation>
15         </annotation>
16         <complexContent>
17             <extension base="afp:MatchFunctorType" />
18         </complexContent>
19     </complexType>
20
21     <!--  Boolean Match Functions -->
22     <complexType name="AND">
23         <annotation>
24             <documentation>
25                 A match function that performs a logical AND on the results of all contained matching functions.
26             </documentation>
27         </annotation>
28         <complexContent>
29             <extension base="afp:MatchFunctorType">
30                 <choice minOccurs="2" maxOccurs="unbounded">
31                     <element name="Rule" type="afp:MatchFunctorType">
32                         <annotation>
33                             <documentation>
34                                 The set of match function rules to be ANDed.
35                             </documentation>
36                         </annotation>
37                     </element>
38                     <element name="RuleReference" type="afp:ReferenceType">
39                         <annotation>
40                             <documentation>
41                                 The set of match function rules to be ANDed.
42                             </documentation>
43                         </annotation>
44                     </element>
45                 </choice>
46             </extension>
47         </complexContent>
48     </complexType>
49
50     <complexType name="OR">
51         <annotation>
52             <documentation>
53                 A match function that performs a logical OR on the results of all contained matching functions.
54             </documentation>
55         </annotation>
56         <complexContent>
57             <extension base="afp:MatchFunctorType">
58                 <choice minOccurs="2" maxOccurs="unbounded">
59                     <element name="Rule" type="afp:MatchFunctorType">
60                         <annotation>
61                             <documentation>
62                                 The set of match function rules to be ANDed.
63                             </documentation>
64                         </annotation>
65                     </element>
66                     <element name="RuleReference" type="afp:ReferenceType">
67                         <annotation>
68                             <documentation>
69                                 The set of match function rules to be ANDed.
70                             </documentation>
71                         </annotation>
72                     </element>
73                 </choice>
74             </extension>
75         </complexContent>
76     </complexType>
77
78     <complexType name="NOT">
79         <annotation>
80             <documentation>
81                 A match function that performs a logical NOT on the resultof the contained matching function.
82             </documentation>
83         </annotation>
84         <complexContent>
85             <extension base="afp:MatchFunctorType">
86                 <choice>
87                     <element name="Rule" type="afp:MatchFunctorType">
88                         <annotation>
89                             <documentation>
90                                 The set of match function rules to be ANDed.
91                             </documentation>
92                         </annotation>
93                     </element>
94                     <element name="RuleReference" type="afp:ReferenceType">
95                         <annotation>
96                             <documentation>
97                                 The set of match function rules to be ANDed.
98                             </documentation>
99                         </annotation>
100                     </element>
101                 </choice>
102             </extension>
103         </complexContent>
104     </complexType>
105
106     <!--  Literal String Match Functions -->
107     <complexType name="AttributeRequesterString">
108         <annotation>
109             <documentation>
110                 A match function that matches the attribute request against the specified value.
111             </documentation>
112         </annotation>
113         <complexContent>
114             <extension base="basic:StringMatchType" />
115         </complexContent>
116     </complexType>
117
118     <complexType name="AttributeIssuerString">
119         <annotation>
120             <documentation>
121                 A match function that matches the attribute issuer against the specified value.
122             </documentation>
123         </annotation>
124         <complexContent>
125             <extension base="basic:StringMatchType" />
126         </complexContent>
127     </complexType>
128
129     <complexType name="PrincipalNameString">
130         <annotation>
131             <documentation>A match function that matches the principal name against the specified value.</documentation>
132         </annotation>
133         <complexContent>
134             <extension base="basic:StringMatchType" />
135         </complexContent>
136     </complexType>
137
138     <complexType name="AuthenticationMethodString">
139         <annotation>
140             <documentation>
141                 A match function that matches the authentication method against the specified value.
142             </documentation>
143         </annotation>
144         <complexContent>
145             <extension base="basic:StringMatchType" />
146         </complexContent>
147     </complexType>
148
149     <complexType name="AttributeValueString">
150         <annotation>
151             <documentation>
152                 A match function that matches the value of an attribute against the specified value. This match
153                 evaluates to true if the attribute contains the specified value.
154             </documentation>
155         </annotation>
156         <complexContent>
157             <extension base="basic:AttributeTargetedStringMatchType" />
158         </complexContent>
159     </complexType>
160
161     <complexType name="AttributeScopeString">
162         <annotation>
163             <documentation>
164                 A match function that matches the attribute scope against the specified value.
165             </documentation>
166         </annotation>
167         <complexContent>
168             <extension base="basic:AttributeTargetedStringMatchType" />
169         </complexContent>
170     </complexType>
171
172     <complexType name="AttributeTargetedStringMatchType" abstract="true">
173         <complexContent>
174             <extension base="basic:StringMatchType">
175                 <attribute name="attributeID" type="string">
176                     <annotation>
177                         <documentation>
178                             The ID of the attribute whose value should be matched. If no attribute ID is specified the
179                             ID of the containing attribute rule is assumed.
180                         </documentation>
181                     </annotation>
182                 </attribute>
183             </extension>
184         </complexContent>
185     </complexType>
186
187     <complexType name="StringMatchType" abstract="true">
188         <complexContent>
189             <extension base="afp:MatchFunctorType">
190                 <attribute name="value" type="string" use="required">
191                     <annotation>
192                         <documentation>The string value to match.</documentation>
193                     </annotation>
194                 </attribute>
195                 <attribute name="ignoreCase" type="boolean" default="false">
196                     <annotation>
197                         <documentation>
198                             A boolean flag indicating whether case should be ignored when evaluating the match.
199                         </documentation>
200                     </annotation>
201                 </attribute>
202             </extension>
203         </complexContent>
204     </complexType>
205
206     <!--  Regular Expression Match Functions -->
207     <complexType name="AttributeRequesterRegex">
208         <annotation>
209             <documentation>
210                 A match function that matches the attribute requester against the specified regular expression.
211             </documentation>
212         </annotation>
213         <complexContent>
214             <extension base="basic:RegexMatchType" />
215         </complexContent>
216     </complexType>
217
218     <complexType name="AttributeIssuerRegex">
219         <annotation>
220             <documentation>
221                 A match function that matches the attribute issuer against the specified regular expression.
222             </documentation>
223         </annotation>
224         <complexContent>
225             <extension base="basic:RegexMatchType" />
226         </complexContent>
227     </complexType>
228
229     <complexType name="PrincipalNameRegex">
230         <annotation>
231             <documentation>
232                 A match function that matches the principal name against the specified regular expression.
233             </documentation>
234         </annotation>
235         <complexContent>
236             <extension base="basic:RegexMatchType" />
237         </complexContent>
238     </complexType>
239
240     <complexType name="AuthenticationMethodRegex">
241         <annotation>
242             <documentation>
243                 A match function that matches the authentication method against the specified regular expression.
244             </documentation>
245         </annotation>
246         <complexContent>
247             <extension base="basic:RegexMatchType" />
248         </complexContent>
249     </complexType>
250
251     <complexType name="AttributeValueRegex">
252         <annotation>
253             <documentation>
254                 A match function that matches an attribute value against the specified regular expression. This function
255                 evaluates to true if any value matches the given expression
256             </documentation>
257         </annotation>
258         <complexContent>
259             <extension base="basic:AttributeTargetedRegexMatchType" />
260         </complexContent>
261     </complexType>
262
263     <complexType name="AttributeScopeRegex">
264         <annotation>
265             <documentation>
266                 A match function that matches the attribute scope against the specified regular expression.
267             </documentation>
268         </annotation>
269         <complexContent>
270             <extension base="basic:AttributeTargetedRegexMatchType" />
271         </complexContent>
272     </complexType>
273
274     <complexType name="AttributeTargetedRegexMatchType">
275         <complexContent>
276             <extension base="basic:RegexMatchType">
277                 <attribute name="attributeID" type="string">
278                     <annotation>
279                         <documentation>
280                             The ID of the attribute whose value should be matched. If no attribute ID is specified the
281                             ID of the containing attribute rule is assumed.
282                         </documentation>
283                     </annotation>
284                 </attribute>
285             </extension>
286         </complexContent>
287     </complexType>
288
289     <complexType name="RegexMatchType" abstract="true">
290         <complexContent>
291             <extension base="afp:MatchFunctorType">
292                 <attribute name="regex" type="string" use="required">
293                     <annotation>
294                         <documentation>The regular expression values are matched against.</documentation>
295                     </annotation>
296                 </attribute>
297                 <attribute name="options" type="string">
298                     <annotation>
299                         <documentation>The regular expression options to apply.</documentation>
300                     </annotation>
301                 </attribute>
302             </extension>
303         </complexContent>
304     </complexType>
305
306     <!-- Misc. Functions -->
307     <complexType name="Script">
308         <annotation>
309             <documentation>
310                 A match function that evaluates a script to determine if some criteria is met. The script MUST return a
311                 boolean.
312             </documentation>
313         </annotation>
314         <complexContent>
315             <extension base="afp:MatchFunctorType">
316                 <choice>
317                     <element name="Script" type="string" minOccurs="0">
318                         <annotation>
319                             <documentation>The script to evaluate to construct the attribute.</documentation>
320                         </annotation>
321                     </element>
322                     <element name="ScriptFile" type="string" minOccurs="0">
323                         <annotation>
324                             <documentation>
325                                 The filesystem path to the script to evaluate to construct the attribute.
326                             </documentation>
327                         </annotation>
328                     </element>
329                 </choice>
330                 <attribute name="language" type="string" default="javascript">
331                     <annotation>
332                         <documentation>
333                             The JSR-233 name for the scripting language that will be used. By default "javascript" is
334                             supported.
335                         </documentation>
336                     </annotation>
337                 </attribute>
338             </extension>
339         </complexContent>
340     </complexType>
341
342     <complexType name="NumberOfAttributeValues">
343         <annotation>
344             <documentation>
345                 A match function that evaluates to true if the given attribute has as a number of values that falls
346                 between the minimum and maximum. This method may be used as a sanity check to ensure that an unexpected
347                 number of values did not come from the attribute resolver and be released.
348             </documentation>
349         </annotation>
350         <complexContent>
351             <extension base="afp:MatchFunctorType">
352                 <attribute name="attributeID" type="string" use="required">
353                     <annotation>
354                         <documentation>The ID of the attribute whose value should be matched.</documentation>
355                     </annotation>
356                 </attribute>
357                 <attribute name="minimum" type="nonNegativeInteger" default="0">
358                     <annotation>
359                         <documentation>Minimum number of values an attribute may have.</documentation>
360                     </annotation>
361                 </attribute>
362                 <attribute name="maximum" type="positiveInteger" default="2147483647">
363                     <annotation>
364                         <documentation>Maximum number of values an attribute may have.</documentation>
365                     </annotation>
366                 </attribute>
367             </extension>
368         </complexContent>
369     </complexType>
370
371 </schema>