*** empty log message ***
[shibboleth/sp.git] / schemas / xmldsig-core-schema.xsd
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE schema
3  [
4    <!ATTLIST schema 
5      xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
6    <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
7    <!ENTITY % p ''>
8    <!ENTITY % s ''>
9   ]>
10
11 <!-- Schema for XML Signatures
12     http://www.w3.org/2000/09/xmldsig#
13     $Revision$ on $Date$ by $Author$
14
15     Copyright 2001 The Internet Society and W3C (Massachusetts Institute
16     of Technology, Institut National de Recherche en Informatique et en
17     Automatique, Keio University). All Rights Reserved.
18     http://www.w3.org/Consortium/Legal/
19
20     This document is governed by the W3C Software License [1] as described
21     in the FAQ [2].
22
23     [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
24     [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
25 -->
26
27
28 <schema xmlns="http://www.w3.org/2001/XMLSchema"
29         xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
30         targetNamespace="http://www.w3.org/2000/09/xmldsig#"
31         version="0.1" elementFormDefault="qualified"> 
32
33 <!-- Basic Types Defined for Signatures -->
34
35 <simpleType name="CryptoBinary">
36   <restriction base="base64Binary">
37   </restriction>
38 </simpleType>
39
40 <!-- Start Signature -->
41
42 <element name="Signature" type="ds:SignatureType"/>
43 <complexType name="SignatureType">
44   <sequence> 
45     <element ref="ds:SignedInfo"/> 
46     <element ref="ds:SignatureValue"/> 
47     <element ref="ds:KeyInfo" minOccurs="0"/> 
48     <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> 
49   </sequence>  
50   <attribute name="Id" type="ID" use="optional"/>
51 </complexType>
52
53   <element name="SignatureValue" type="ds:SignatureValueType"/> 
54   <complexType name="SignatureValueType">
55     <simpleContent>
56       <extension base="base64Binary">
57         <attribute name="Id" type="ID" use="optional"/>
58       </extension>
59     </simpleContent>
60   </complexType>
61
62 <!-- Start SignedInfo -->
63
64 <element name="SignedInfo" type="ds:SignedInfoType"/>
65 <complexType name="SignedInfoType">
66   <sequence> 
67     <element ref="ds:CanonicalizationMethod"/> 
68     <element ref="ds:SignatureMethod"/> 
69     <element ref="ds:Reference" maxOccurs="unbounded"/> 
70   </sequence>  
71   <attribute name="Id" type="ID" use="optional"/> 
72 </complexType>
73
74   <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> 
75   <complexType name="CanonicalizationMethodType" mixed="true">
76     <sequence>
77       <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
78       <!-- (0,unbounded) elements from (1,1) namespace -->
79     </sequence>
80     <attribute name="Algorithm" type="anyURI" use="required"/> 
81   </complexType>
82
83   <element name="SignatureMethod" type="ds:SignatureMethodType"/>
84   <complexType name="SignatureMethodType" mixed="true">
85     <sequence>
86       <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
87       <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
88       <!-- (0,unbounded) elements from (1,1) external namespace -->
89     </sequence>
90     <attribute name="Algorithm" type="anyURI" use="required"/> 
91   </complexType>
92
93 <!-- Start Reference -->
94
95 <element name="Reference" type="ds:ReferenceType"/>
96 <complexType name="ReferenceType">
97   <sequence> 
98     <element ref="ds:Transforms" minOccurs="0"/> 
99     <element ref="ds:DigestMethod"/> 
100     <element ref="ds:DigestValue"/> 
101   </sequence>
102   <attribute name="Id" type="ID" use="optional"/> 
103   <attribute name="URI" type="anyURI" use="optional"/> 
104   <attribute name="Type" type="anyURI" use="optional"/> 
105 </complexType>
106
107   <element name="Transforms" type="ds:TransformsType"/>
108   <complexType name="TransformsType">
109     <sequence>
110       <element ref="ds:Transform" maxOccurs="unbounded"/>  
111     </sequence>
112   </complexType>
113
114   <element name="Transform" type="ds:TransformType"/>
115   <complexType name="TransformType" mixed="true">
116     <choice minOccurs="0" maxOccurs="unbounded"> 
117       <any namespace="##other" processContents="lax"/>
118       <!-- (1,1) elements from (0,unbounded) namespaces -->
119       <element name="XPath" type="string"/> 
120     </choice>
121     <attribute name="Algorithm" type="anyURI" use="required"/> 
122   </complexType>
123
124 <!-- End Reference -->
125
126 <element name="DigestMethod" type="ds:DigestMethodType"/>
127 <complexType name="DigestMethodType" mixed="true"> 
128   <sequence>
129     <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
130   </sequence>    
131   <attribute name="Algorithm" type="anyURI" use="required"/> 
132 </complexType>
133
134 <element name="DigestValue" type="ds:DigestValueType"/>
135 <simpleType name="DigestValueType">
136   <restriction base="base64Binary"/>
137 </simpleType>
138
139 <!-- End SignedInfo -->
140
141 <!-- Start KeyInfo -->
142
143 <element name="KeyInfo" type="ds:KeyInfoType"/> 
144 <complexType name="KeyInfoType" mixed="true">
145   <choice maxOccurs="unbounded">     
146     <element ref="ds:KeyName"/> 
147     <element ref="ds:KeyValue"/> 
148     <element ref="ds:RetrievalMethod"/> 
149     <element ref="ds:X509Data"/> 
150     <element ref="ds:PGPData"/> 
151     <element ref="ds:SPKIData"/>
152     <element ref="ds:MgmtData"/>
153     <any processContents="lax" namespace="##other"/>
154     <!-- (1,1) elements from (0,unbounded) namespaces -->
155   </choice>
156   <attribute name="Id" type="ID" use="optional"/> 
157 </complexType>
158
159   <element name="KeyName" type="string"/>
160   <element name="MgmtData" type="string"/>
161
162   <element name="KeyValue" type="ds:KeyValueType"/> 
163   <complexType name="KeyValueType" mixed="true">
164    <choice>
165      <element ref="ds:DSAKeyValue"/>
166      <element ref="ds:RSAKeyValue"/>
167      <any namespace="##other" processContents="lax"/>
168    </choice>
169   </complexType>
170
171   <element name="RetrievalMethod" type="ds:RetrievalMethodType"/> 
172   <complexType name="RetrievalMethodType">
173     <sequence>
174       <element ref="ds:Transforms" minOccurs="0"/> 
175     </sequence>  
176     <attribute name="URI" type="anyURI"/>
177     <attribute name="Type" type="anyURI" use="optional"/>
178   </complexType>
179
180 <!-- Start X509Data -->
181
182 <element name="X509Data" type="ds:X509DataType"/> 
183 <complexType name="X509DataType">
184   <sequence maxOccurs="unbounded">
185     <choice>
186       <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
187       <element name="X509SKI" type="base64Binary"/>
188       <element name="X509SubjectName" type="string"/>
189       <element name="X509Certificate" type="base64Binary"/>
190       <element name="X509CRL" type="base64Binary"/>
191       <any namespace="##other" processContents="lax"/>
192     </choice>
193   </sequence>
194 </complexType>
195
196 <complexType name="X509IssuerSerialType"> 
197   <sequence> 
198     <element name="X509IssuerName" type="string"/> 
199     <element name="X509SerialNumber" type="integer"/> 
200   </sequence>
201 </complexType>
202
203 <!-- End X509Data -->
204
205 <!-- Begin PGPData -->
206
207 <element name="PGPData" type="ds:PGPDataType"/> 
208 <complexType name="PGPDataType"> 
209   <choice>
210     <sequence>
211       <element name="PGPKeyID" type="base64Binary"/> 
212       <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> 
213       <any namespace="##other" processContents="lax" minOccurs="0"
214        maxOccurs="unbounded"/>
215     </sequence>
216     <sequence>
217       <element name="PGPKeyPacket" type="base64Binary"/> 
218       <any namespace="##other" processContents="lax" minOccurs="0"
219        maxOccurs="unbounded"/>
220     </sequence>
221   </choice>
222 </complexType>
223
224 <!-- End PGPData -->
225
226 <!-- Begin SPKIData -->
227
228 <element name="SPKIData" type="ds:SPKIDataType"/> 
229 <complexType name="SPKIDataType">
230   <sequence maxOccurs="unbounded">
231     <element name="SPKISexp" type="base64Binary"/>
232     <any namespace="##other" processContents="lax" minOccurs="0"/>
233   </sequence>
234 </complexType> 
235
236 <!-- End SPKIData -->
237
238 <!-- End KeyInfo -->
239
240 <!-- Start Object (Manifest, SignatureProperty) -->
241
242 <element name="Object" type="ds:ObjectType"/> 
243 <complexType name="ObjectType" mixed="true">
244   <sequence minOccurs="0" maxOccurs="unbounded">
245     <any namespace="##any" processContents="lax"/>
246   </sequence>
247   <attribute name="Id" type="ID" use="optional"/> 
248   <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
249   <attribute name="Encoding" type="anyURI" use="optional"/> 
250 </complexType>
251
252 <element name="Manifest" type="ds:ManifestType"/> 
253 <complexType name="ManifestType">
254   <sequence>
255     <element ref="ds:Reference" maxOccurs="unbounded"/> 
256   </sequence>
257   <attribute name="Id" type="ID" use="optional"/> 
258 </complexType>
259
260 <element name="SignatureProperties" type="ds:SignaturePropertiesType"/> 
261 <complexType name="SignaturePropertiesType">
262   <sequence>
263     <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> 
264   </sequence>
265   <attribute name="Id" type="ID" use="optional"/> 
266 </complexType>
267
268    <element name="SignatureProperty" type="ds:SignaturePropertyType"/> 
269    <complexType name="SignaturePropertyType" mixed="true">
270      <choice maxOccurs="unbounded">
271        <any namespace="##other" processContents="lax"/>
272        <!-- (1,1) elements from (1,unbounded) namespaces -->
273      </choice>
274      <attribute name="Target" type="anyURI" use="required"/> 
275      <attribute name="Id" type="ID" use="optional"/> 
276    </complexType>
277
278 <!-- End Object (Manifest, SignatureProperty) -->
279
280 <!-- Start Algorithm Parameters -->
281
282 <simpleType name="HMACOutputLengthType">
283   <restriction base="integer"/>
284 </simpleType>
285
286 <!-- Start KeyValue Element-types -->
287
288 <element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
289 <complexType name="DSAKeyValueType">
290   <sequence>
291     <sequence minOccurs="0">
292       <element name="P" type="ds:CryptoBinary"/>
293       <element name="Q" type="ds:CryptoBinary"/>
294     </sequence>
295     <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
296     <element name="Y" type="ds:CryptoBinary"/>
297     <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
298     <sequence minOccurs="0">
299       <element name="Seed" type="ds:CryptoBinary"/>
300       <element name="PgenCounter" type="ds:CryptoBinary"/>
301     </sequence>
302   </sequence>
303 </complexType>
304
305 <element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
306 <complexType name="RSAKeyValueType">
307   <sequence>
308     <element name="Modulus" type="ds:CryptoBinary"/> 
309     <element name="Exponent" type="ds:CryptoBinary"/> 
310   </sequence>
311 </complexType> 
312
313 <!-- End KeyValue Element-types -->
314
315 <!-- End Signature -->
316
317 </schema>