source: OAIHarvester/trunk/OAIHarvester/src/main/resources/META-INF/OAI-PMH.xsd @ 1128

Last change on this file since 1128 was 1128, checked in by oschonef, 13 years ago
  • initial import of OAI harvester (... now for real ;)
  • Property svn:eol-style set to native
  • Property svn:mime-type set to application/xml
File size: 11.1 KB
Line 
1<schema targetNamespace="http://www.openarchives.org/OAI/2.0/"
2        xmlns="http://www.w3.org/2001/XMLSchema"
3        xmlns:oai="http://www.openarchives.org/OAI/2.0/"
4        elementFormDefault="qualified"
5        attributeFormDefault="unqualified">
6
7  <annotation>
8    <documentation>
9    XML Schema which can be used to validate replies to all OAI-PMH
10    v2.0 requests. Herbert Van de Sompel, 2002-05-13.
11    Validated with XML Spy v.4.3 on 2002-05-13.
12    Validated with XSV 1.203.2.45/1.106.2.22 on 2002-05-13.
13    Added definition of protocolVersionType instead of using anonymous
14    type. No change of function. Simeon Warner, 2004-03-29.
15    Tightened definition of UTCdatetimeType to enforce the restriction
16    to UTC Z notation. Simeon Warner, 2004-09-14.
17    Corrected pattern matches for setSpecType and metadataPrefixType
18    to agree with protocol specification. Simeon Warner, 2004-10-12.
19    Spelling correction. Simeon Warner, 2008-12-07.
20    $Date: 2004/10/12 15:20:29 $
21    </documentation>
22  </annotation>
23
24  <element name="OAI-PMH" type="oai:OAI-PMHtype"/>
25
26  <complexType name="OAI-PMHtype">
27    <sequence>
28      <element name="responseDate" type="dateTime"/>
29      <element name="request" type="oai:requestType"/>
30      <choice>
31        <element name="error" type="oai:OAI-PMHerrorType" maxOccurs="unbounded"/>
32        <element name="Identify" type="oai:IdentifyType"/>
33        <element name="ListMetadataFormats" type="oai:ListMetadataFormatsType"/>
34        <element name="ListSets" type="oai:ListSetsType"/>
35        <element name="GetRecord" type="oai:GetRecordType"/>
36        <element name="ListIdentifiers" type="oai:ListIdentifiersType"/>
37        <element name="ListRecords" type="oai:ListRecordsType"/>
38      </choice>
39    </sequence>
40  </complexType>
41
42  <complexType name="requestType">
43    <annotation>
44      <documentation>Define requestType, indicating the protocol request that
45      led to the response. Element content is BASE-URL, attributes are arguments
46      of protocol request, attribute-values are values of arguments of protocol
47      request</documentation>
48    </annotation>
49    <simpleContent>
50      <extension base="anyURI">
51        <attribute name="verb" type="oai:verbType" use="optional"/>
52        <attribute name="identifier" type="oai:identifierType" use="optional"/>
53        <attribute name="metadataPrefix" type="oai:metadataPrefixType" use="optional"/>
54        <attribute name="from" type="oai:UTCdatetimeType" use="optional"/>
55        <attribute name="until" type="oai:UTCdatetimeType" use="optional"/>
56        <attribute name="set" type="oai:setSpecType" use="optional"/>
57        <attribute name="resumptionToken" type="string" use="optional"/>
58      </extension>
59    </simpleContent>
60  </complexType>
61
62  <simpleType name="verbType">
63    <restriction base="string">
64      <enumeration value="Identify"/>
65      <enumeration value="ListMetadataFormats"/>
66      <enumeration value="ListSets"/>
67      <enumeration value="GetRecord"/>
68      <enumeration value="ListIdentifiers"/>
69      <enumeration value="ListRecords"/>
70    </restriction>
71  </simpleType>
72
73  <!-- define OAI-PMH error conditions -->
74  <!-- =============================== -->
75
76  <complexType name="OAI-PMHerrorType">
77    <simpleContent>
78      <extension base="string">
79        <attribute name="code" type="oai:OAI-PMHerrorcodeType" use="required"/>
80      </extension>
81    </simpleContent>
82  </complexType>
83
84  <simpleType name="OAI-PMHerrorcodeType">
85    <restriction base="string">
86      <enumeration value="cannotDisseminateFormat"/>
87      <enumeration value="idDoesNotExist"/>
88      <enumeration value="badArgument"/>
89      <enumeration value="badVerb"/>
90      <enumeration value="noMetadataFormats"/>
91      <enumeration value="noRecordsMatch"/>
92      <enumeration value="badResumptionToken"/>
93      <enumeration value="noSetHierarchy"/>
94    </restriction>
95  </simpleType>
96
97  <!-- define OAI-PMH verb containers -->
98  <!-- ============================== -->
99
100  <complexType name="IdentifyType">
101    <sequence>
102      <element name="repositoryName" type="string"/>
103      <element name="baseURL" type="anyURI"/>
104      <element name="protocolVersion" type="oai:protocolVersionType"/>
105      <element name="adminEmail" type="oai:emailType" maxOccurs="unbounded"/>
106      <element name="earliestDatestamp" type="oai:UTCdatetimeType"/>
107      <element name="deletedRecord" type="oai:deletedRecordType"/>
108      <element name="granularity" type="oai:granularityType"/>
109      <element name="compression" type="string" minOccurs="0" maxOccurs="unbounded"/>
110      <element name="description" type="oai:descriptionType" 
111               minOccurs="0" maxOccurs="unbounded"/>
112    </sequence>
113  </complexType>
114
115  <complexType name="ListMetadataFormatsType">
116    <sequence>
117      <element name="metadataFormat" type="oai:metadataFormatType" maxOccurs="unbounded"/>
118    </sequence>
119  </complexType>
120
121  <complexType name="ListSetsType">
122    <sequence>
123      <element name="set" type="oai:setType" maxOccurs="unbounded"/>
124      <element name="resumptionToken" type="oai:resumptionTokenType" minOccurs="0"/>
125    </sequence>
126  </complexType>
127
128  <complexType name="GetRecordType">
129    <sequence>
130      <element name="record" type="oai:recordType"/>
131    </sequence>
132  </complexType>
133
134  <complexType name="ListRecordsType">
135    <sequence>
136      <element name="record" type="oai:recordType" maxOccurs="unbounded"/>
137      <element name="resumptionToken" type="oai:resumptionTokenType" minOccurs="0"/>
138    </sequence>
139  </complexType>
140
141  <complexType name="ListIdentifiersType">
142    <sequence>
143      <element name="header" type="oai:headerType" maxOccurs="unbounded"/>
144      <element name="resumptionToken" type="oai:resumptionTokenType" minOccurs="0"/>
145    </sequence>
146  </complexType>
147
148  <!-- define basic types used in replies to
149       GetRecord, ListRecords, ListIdentifiers -->
150  <!-- ======================================= -->
151
152  <complexType name="recordType">
153    <annotation>
154      <documentation>A record has a header, a metadata part, and
155        an optional about container</documentation>
156    </annotation>
157    <sequence>
158      <element name="header" type="oai:headerType"/>
159      <element name="metadata" type="oai:metadataType" minOccurs="0"/>
160      <element name="about" type="oai:aboutType" minOccurs="0" maxOccurs="unbounded"/>
161    </sequence>
162  </complexType>
163
164  <complexType name="headerType">
165    <annotation>
166      <documentation>A header has a unique identifier, a datestamp,
167        and setSpec(s) in case the item from which
168        the record is disseminated belongs to set(s).
169        the header can carry a deleted status indicating
170        that the record is deleted.</documentation>
171    </annotation>
172    <sequence>
173      <element name="identifier" type="oai:identifierType"/>
174      <element name="datestamp" type="oai:UTCdatetimeType"/>
175      <element name="setSpec" type="oai:setSpecType" minOccurs="0" maxOccurs="unbounded"/>
176    </sequence>
177    <attribute name="status" type="oai:statusType" use="optional"/>
178  </complexType>
179
180  <simpleType name="identifierType">
181    <restriction base="anyURI"/>
182  </simpleType>
183
184  <simpleType name="statusType">
185    <restriction base="string">
186      <enumeration value="deleted"/>
187    </restriction>
188  </simpleType>
189
190  <complexType name="metadataType">
191    <annotation>
192      <documentation>Metadata must be expressed in XML that complies
193       with another XML Schema (namespace=#other). Metadata must be
194       explicitly qualified in the response.</documentation>
195    </annotation>
196    <sequence>
197      <any namespace="##other" processContents="strict"/>
198    </sequence>
199  </complexType>
200
201  <complexType name="aboutType">
202    <annotation>
203      <documentation>Data "about" the record must be expressed in XML
204      that is compliant with an XML Schema defined by a community.</documentation>
205    </annotation>
206    <sequence>
207      <any namespace="##other" processContents="strict"/>
208    </sequence>
209  </complexType>
210
211  <complexType name="resumptionTokenType">
212    <annotation>
213      <documentation>A resumptionToken may have 3 optional attributes
214       and can be used in ListSets, ListIdentifiers, ListRecords
215       responses.</documentation>
216    </annotation>
217    <simpleContent>
218      <extension base="string">
219        <attribute name="expirationDate" type="dateTime" use="optional"/>
220        <attribute name="completeListSize" type="positiveInteger" use="optional"/>
221        <attribute name="cursor" type="nonNegativeInteger" use="optional"/>
222      </extension>
223    </simpleContent>
224  </complexType>
225
226  <complexType name="descriptionType">
227    <annotation>
228      <documentation>The descriptionType is used for the description
229      element in Identify and for setDescription element in ListSets.
230      Content must be compliant with an XML Schema defined by a
231      community.</documentation>
232    </annotation>
233    <sequence>
234      <any namespace="##other" processContents="strict"/>
235    </sequence>
236  </complexType>
237
238  <simpleType name="UTCdatetimeType">
239    <annotation>
240      <documentation>Datestamps are to either day (type date)
241      or to seconds granularity (type oai:UTCdateTimeZType)</documentation>
242    </annotation>
243    <union memberTypes="date oai:UTCdateTimeZType"/>
244  </simpleType>
245
246  <simpleType name="UTCdateTimeZType">
247    <restriction base="dateTime">
248      <pattern value=".*Z"/>
249    </restriction>
250  </simpleType>
251
252  <!-- define types used for Identify verb only -->
253  <!-- ======================================== -->
254
255  <simpleType name="protocolVersionType">
256    <restriction base="string">
257      <enumeration value="2.0"/>
258    </restriction>
259  </simpleType>
260
261  <simpleType name="emailType">
262    <restriction base="string">
263      <pattern value="\S+@(\S+\.)+\S+"/>
264    </restriction>
265  </simpleType>
266
267  <simpleType name="deletedRecordType">
268    <restriction base="string">
269      <enumeration value="no"/>
270      <enumeration value="persistent"/>
271      <enumeration value="transient"/>
272    </restriction>
273  </simpleType>
274
275  <simpleType name="granularityType">
276    <restriction base="string">
277      <enumeration value="YYYY-MM-DD"/>
278      <enumeration value="YYYY-MM-DDThh:mm:ssZ"/>
279    </restriction>
280  </simpleType>
281
282  <!-- define types used for ListMetadataFormats verb only -->
283  <!-- =================================================== -->
284
285  <complexType name="metadataFormatType">
286    <sequence>
287      <element name="metadataPrefix" type="oai:metadataPrefixType"/>
288      <element name="schema" type="anyURI"/>
289      <element name="metadataNamespace" type="anyURI"/>
290    </sequence>
291  </complexType>
292
293  <simpleType name="metadataPrefixType">
294    <restriction base="string">
295      <pattern value="[A-Za-z0-9\-_\.!~\*'\(\)]+"/>
296    </restriction>
297  </simpleType>
298
299  <!-- define types used for ListSets verb -->
300  <!-- =================================== -->
301
302  <complexType name="setType">
303    <sequence>
304      <element name="setSpec" type="oai:setSpecType"/>
305      <element name="setName" type="string"/>
306      <element name="setDescription" type="oai:descriptionType" 
307               minOccurs="0" maxOccurs="unbounded"/>
308    </sequence>
309  </complexType>
310
311  <simpleType name="setSpecType">
312    <restriction base="string">
313      <pattern value="([A-Za-z0-9\-_\.!~\*'\(\)])+(:[A-Za-z0-9\-_\.!~\*'\(\)]+)*"/>
314    </restriction>
315  </simpleType>
316
317</schema>
Note: See TracBrowser for help on using the repository browser.