-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcavexml.xsd
465 lines (446 loc) · 19.7 KB
/
cavexml.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<!-- CaveXML Schema
Aug 2020 - Norbert Schorghofer
Nov 2020 - changed from xs:choice to xs:sequence
-->
<!-- declare special data type -->
<xs:simpleType name="ExtendedUnsignedInteger">
<xs:restriction base='xs:token'>
<xs:pattern value="[~>]?[0-9]+[+]?"/>
<!-- Examples of matching patterns: 1234, ~1500, >27, 3500+
Examples of non-matching patterns: 123.4, >~2000, 100-200
-->
</xs:restriction>
</xs:simpleType>
<!-- start of main database -->
<xs:element name="CaveDataBase">
<xs:complexType>
<xs:sequence>
<xs:element name="record" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="country-name" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value=""/> <!-- allow empty -->
<!-- names are based on https://www.geonames.org/countries/ and in most instances
the same as ISO 3166 country names; if not ISO then noted in comment -->
<xs:enumeration value="Afghanistan"/>
<xs:enumeration value="Åland Islands"/> <!-- ISO 3166, "Åland" on GeoNames -->
<xs:enumeration value="Albania"/>
<xs:enumeration value="Algeria"/>
<xs:enumeration value="American Samoa"/>
<xs:enumeration value="Andorra"/>
<xs:enumeration value="Angola"/>
<xs:enumeration value="Anguila"/>
<xs:enumeration value="Antarctica"/>
<xs:enumeration value="Antigua and Barbuda"/>
<xs:enumeration value="Argentina"/>
<xs:enumeration value="Armenia"/>
<xs:enumeration value="Aruba"/>
<xs:enumeration value="Australia"/>
<xs:enumeration value="Austria"/>
<xs:enumeration value="Azerbaijan"/>
<xs:enumeration value="Bahamas"/>
<xs:enumeration value="Bahrain"/>
<xs:enumeration value="Bangladesh"/>
<xs:enumeration value="Barbados"/>
<xs:enumeration value="Belarus"/>
<xs:enumeration value="Belgium"/>
<xs:enumeration value="Belize"/>
<xs:enumeration value="Benin"/>
<xs:enumeration value="Bermuda"/>
<xs:enumeration value="Bhutan"/>
<xs:enumeration value="Bolivia"/> <!-- ISO would be "Bolivia, Plurinational State of" -->
<xs:enumeration value="Bonaire, Sint Eustatius and Saba"/>
<xs:enumeration value="Bosnia and Herzegovina"/>
<xs:enumeration value="Botswana"/>
<xs:enumeration value="Bouvet Island"/>
<xs:enumeration value="Brazil"/>
<xs:enumeration value="British Indian Ocean Territory"/>
<xs:enumeration value="Brunei Darusalam"/>
<xs:enumeration value="Bulgaria"/>
<xs:enumeration value="Burkina Faso"/>
<xs:enumeration value="Burundi"/>
<xs:enumeration value="Cambodia"/>
<xs:enumeration value="Cameroon"/>
<xs:enumeration value="Canada"/>
<xs:enumeration value="Cape Verde"/>
<xs:enumeration value="Cayman Islands"/>
<xs:enumeration value="Central African Republic"/>
<xs:enumeration value="Chad"/>
<xs:enumeration value="Chile"/>
<xs:enumeration value="China"/>
<xs:enumeration value="Christmas Island"/>
<xs:enumeration value="Cocos (Keeling) Islands"/>
<xs:enumeration value="Colombia"/>
<xs:enumeration value="Comoros"/>
<xs:enumeration value="Congo"/>
<xs:enumeration value="Congo, Democratic Republic of the"/> <!-- formerly known as Zaire -->
<xs:enumeration value="Cook Islands"/>
<xs:enumeration value="Costa Rica"/>
<xs:enumeration value="Côte d'Ivoire"/>
<xs:enumeration value="Croatia"/>
<xs:enumeration value="Cuba"/>
<xs:enumeration value="Curaçao"/>
<xs:enumeration value="Cyprus"/>
<xs:enumeration value="Czech Republic"/>
<xs:enumeration value="Denmark"/>
<xs:enumeration value="Djibouti"/>
<xs:enumeration value="Dominica"/>
<xs:enumeration value="Dominican Republic"/>
<xs:enumeration value="Ecuador"/>
<xs:enumeration value="Egypt"/>
<xs:enumeration value="El Salvador"/>
<xs:enumeration value="Equatorial Guinea"/>
<xs:enumeration value="Eritrea"/>
<xs:enumeration value="Estonia"/>
<xs:enumeration value="Ethiopia"/>
<xs:enumeration value="Falkland Islands (Malvinas)"/>
<xs:enumeration value="Faroe Islands"/>
<xs:enumeration value="Fiji"/>
<xs:enumeration value="Finland"/>
<xs:enumeration value="France"/>
<xs:enumeration value="French Guiana"/>
<xs:enumeration value="French Polynesia"/>
<xs:enumeration value="French Southern Territories"/>
<xs:enumeration value="Gabon"/>
<xs:enumeration value="Gambia"/>
<xs:enumeration value="Georgia"/>
<xs:enumeration value="Germany"/>
<xs:enumeration value="Ghana"/>
<xs:enumeration value="Gibraltar"/>
<xs:enumeration value="Greece"/>
<xs:enumeration value="Greenland"/>
<xs:enumeration value="Grenada"/>
<xs:enumeration value="Guadeloupe"/>
<xs:enumeration value="Guam"/>
<xs:enumeration value="Guatemala"/>
<xs:enumeration value="Guernsey"/>
<xs:enumeration value="Guinea"/>
<xs:enumeration value="Guinea-Bisau"/>
<xs:enumeration value="Guyana"/>
<xs:enumeration value="Haiti"/>
<xs:enumeration value="Heard Island and McDonald Islands"/>
<xs:enumeration value="Holy See"/>
<xs:enumeration value="Honduras"/>
<xs:enumeration value="Hong Kong"/>
<xs:enumeration value="Hungary"/>
<xs:enumeration value="Iceland"/>
<xs:enumeration value="India"/>
<xs:enumeration value="Indonesia"/>
<xs:enumeration value="Iran"/> <!-- ISO would be "Iran, Islamic Republic of" -->
<xs:enumeration value="Iraq"/>
<xs:enumeration value="Ireland"/>
<xs:enumeration value="Isle of Man"/>
<xs:enumeration value="Israel"/>
<xs:enumeration value="Italy"/>
<xs:enumeration value="Jamaica"/>
<xs:enumeration value="Japan"/>
<xs:enumeration value="Jersey"/>
<xs:enumeration value="Jordan"/>
<xs:enumeration value="Kazakhstan"/>
<xs:enumeration value="Kenya"/>
<xs:enumeration value="Kiribati"/>
<xs:enumeration value="North Korea"/> <!-- ISO would be "Democratic People's Republic of -->
<xs:enumeration value="South Korea"/> <!-- ISO would be "Korea, Republic of" -->
<xs:enumeration value="Kuwait"/>
<xs:enumeration value="Kyrgyzstan"/>
<xs:enumeration value="Laos"/> <!-- ISO would be "Lao People's Democratic Republic" -->
<xs:enumeration value="Latvia"/>
<xs:enumeration value="Lebanon"/>
<xs:enumeration value="Lesotho"/>
<xs:enumeration value="Liberia"/>
<xs:enumeration value="Libya"/>
<xs:enumeration value="Liechtenstein"/>
<xs:enumeration value="Lithuania"/>
<xs:enumeration value="Luxembourg"/>
<xs:enumeration value="Macao"/>
<xs:enumeration value="North Macedonia"/>
<xs:enumeration value="Madagascar"/>
<xs:enumeration value="Malawi"/>
<xs:enumeration value="Malaysia"/>
<xs:enumeration value="Maldives"/>
<xs:enumeration value="Mali"/>
<xs:enumeration value="Malta"/>
<xs:enumeration value="Marshall Islands"/>
<xs:enumeration value="Martinique"/>
<xs:enumeration value="Mauritania"/>
<xs:enumeration value="Mauritius"/>
<xs:enumeration value="Mayote"/>
<xs:enumeration value="Mexico"/>
<xs:enumeration value="Micronesia"/> <!-- ISO would be "Micronesia, Federated States of" -->
<xs:enumeration value="Moldova"/> <!-- ISO would be "Moldova, Republic of" -->
<xs:enumeration value="Monaco"/>
<xs:enumeration value="Mongolia"/>
<xs:enumeration value="Montenegro"/>
<xs:enumeration value="Montserat"/>
<xs:enumeration value="Morocco"/>
<xs:enumeration value="Mozambique"/>
<xs:enumeration value="Myanmar"/>
<xs:enumeration value="Namibia"/>
<xs:enumeration value="Nauru"/>
<xs:enumeration value="Nepal"/>
<xs:enumeration value="Netherlands"/>
<xs:enumeration value="New Caledonia"/>
<xs:enumeration value="New Zealand"/>
<xs:enumeration value="Nicaragua"/>
<xs:enumeration value="Niger"/>
<xs:enumeration value="Nigeria"/>
<xs:enumeration value="Niue"/>
<xs:enumeration value="Norfolk Island"/>
<xs:enumeration value="Northern Mariana Islands"/>
<xs:enumeration value="Norway"/>
<xs:enumeration value="Oman"/>
<xs:enumeration value="Pakistan"/>
<xs:enumeration value="Palau"/>
<xs:enumeration value="Palestine, State of"/>
<xs:enumeration value="Panama"/>
<xs:enumeration value="Papua New Guinea"/>
<xs:enumeration value="Paraguay"/>
<xs:enumeration value="Peru"/>
<xs:enumeration value="Philippines"/>
<xs:enumeration value="Pitcairn"/>
<xs:enumeration value="Poland"/>
<xs:enumeration value="Portugal"/>
<xs:enumeration value="Puerto Rico"/>
<xs:enumeration value="Qatar"/>
<xs:enumeration value="Réunion"/>
<xs:enumeration value="Romania"/>
<xs:enumeration value="Russia"/> <!-- ISO would be "Russian Federation" -->
<xs:enumeration value="Rwanda"/>
<xs:enumeration value="Saint Barthélemy"/>
<xs:enumeration value="Saint Helena, Ascension and Tristan da Cunha"/>
<xs:enumeration value="Saint Kits and Nevis"/>
<xs:enumeration value="Saint Lucia"/>
<xs:enumeration value="Saint Martin (French part)"/>
<xs:enumeration value="Saint Pierre and Miquelon"/>
<xs:enumeration value="Saint Vincent and the Grenadines"/>
<xs:enumeration value="Samoa"/> <!-- formerly known as "Western Samoa" -->
<xs:enumeration value="San Marino"/>
<xs:enumeration value="Sao Tome and Principe"/>
<xs:enumeration value="Saudi Arabia"/>
<xs:enumeration value="Senegal"/>
<xs:enumeration value="Serbia"/>
<xs:enumeration value="Seychelles"/>
<xs:enumeration value="Sierra Leone"/>
<xs:enumeration value="Singapore"/>
<xs:enumeration value="Sint Maarten (dutch part)"/>
<xs:enumeration value="Slovakia"/>
<xs:enumeration value="Slovenia"/>
<xs:enumeration value="Solomon Islands"/>
<xs:enumeration value="Somalia"/>
<xs:enumeration value="South Africa"/>
<xs:enumeration value="South Georgia and the South Sandwich Islands"/> <!-- GeoNames omits "the" -->
<xs:enumeration value="South Sudan"/>
<xs:enumeration value="Spain"/>
<xs:enumeration value="Sri Lanka"/>
<xs:enumeration value="Sudan"/>
<xs:enumeration value="Suriname"/>
<xs:enumeration value="Svalbard and Jan Mayen"/>
<xs:enumeration value="Swaziland"/>
<xs:enumeration value="Sweden"/>
<xs:enumeration value="Switzerland"/>
<xs:enumeration value="Syria"/> <!-- ISO would be "Syrian Arab Republic" -->
<xs:enumeration value="Taiwan"/> <!-- ISO would be "Taiwan, Province of China" -->
<xs:enumeration value="Tajikistan"/>
<xs:enumeration value="Tanzania"/> <!-- ISO would be "Tanzania, United Republic of" -->
<xs:enumeration value="Thailand"/>
<xs:enumeration value="Timor-Leste"/>
<xs:enumeration value="Togo"/>
<xs:enumeration value="Tokelau"/>
<xs:enumeration value="Tonga"/>
<xs:enumeration value="Trinidad and Tobago"/>
<xs:enumeration value="Tunisia"/>
<xs:enumeration value="Turkey"/>
<xs:enumeration value="Turkmenistan"/>
<xs:enumeration value="Turks and Caicos Islands"/>
<xs:enumeration value="Tuvalu"/>
<xs:enumeration value="Uganda"/>
<xs:enumeration value="Ukraine"/>
<xs:enumeration value="United Arab Emirates"/>
<xs:enumeration value="United Kingdom"/>
<xs:enumeration value="United States of America"/>
<xs:enumeration value="United States Minor Outlying Islands"/>
<xs:enumeration value="Uruguay"/>
<xs:enumeration value="Uzbekistan"/>
<xs:enumeration value="Vanuatu"/>
<xs:enumeration value="Venezuela"/> <!-- ISO would be "Venezuela, Bolivarian Republic of" -->
<xs:enumeration value="Vietnam"/> <!-- ISO would be "Viet Nam" -->
<xs:enumeration value="Virgin Islands, British"/>
<xs:enumeration value="Virgin Islands, U.S."/>
<xs:enumeration value="Wallis and Futuna"/>
<xs:enumeration value="Western Sahara"/>
<xs:enumeration value="Yemen"/>
<xs:enumeration value="Zambia"/>
<xs:enumeration value="Zimbabwe"/>
<!-- Planetary Bodies -->
<xs:enumeration value="Mars"/>
<xs:enumeration value="Moon"/>
<xs:enumeration value="Mercury"/>
<xs:enumeration value="Venus"/>
<xs:enumeration value="Io"/>
<xs:enumeration value="Titan"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = "state-or-province" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "phys-area-name" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "principal-cave-name" type = "xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name = "other-cave-name" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "cave-id" minOccurs="0" maxOccurs="unbounded" default="XXX-1234/5">
<xs:simpleType>
<xs:restriction base='xs:token'>
<xs:pattern value="[!-~]*"/>
<!-- Allows characters with ASCII codes from 33 to 126, which excludes whitespaces
Examples of matching patterns: HSS-9876, 1234/5 -->
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:sequence minOccurs="0" maxOccurs="1"> <!-- coordinates (both or none) -->
<xs:element name = "latitude" default="0">
<!-- default value makes empty entries valid -->
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="-90"/>
<xs:maxInclusive value="+90"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = "longitude" default="0">
<!-- default value makes empty entries valid -->
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="-180"/>
<xs:maxInclusive value="+180"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:element name = "altitude" minOccurs="0" maxOccurs="unbounded" default="~0">
<xs:simpleType>
<xs:restriction base='xs:token'>
<xs:pattern value="[~>]?[0-9]{1,5}[+]?[ ,()\w]*"/>
<xs:pattern value="~?-?[0-9]{1,5}[ ,()\w]*"/>
<xs:pattern value="[0-9]{1,5}[-–—][0-9]{1,5}"/>
<!-- matches ExtendedUnsignedInteger plus optional comment OR
negative or positive integer plus optional comment OR
range of positive integers.
Examples of matching patterns: 4258, ~300 main entrance, 100-200, -500
Three dash-like symbols are allowed as range delimiter:
hyphen-minus (x002D, ASCII), en-dash (x2011), and em-dash (x2012)
-->
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = "length" type = "ExtendedUnsignedInteger"
minOccurs="0" maxOccurs="1" default="~0"/>
<xs:element name = "vertical-extent" type = "ExtendedUnsignedInteger"
minOccurs="0" maxOccurs="1" default="~0"/>
<xs:element name = "number-of-entrances" type = "ExtendedUnsignedInteger"
minOccurs="0" maxOccurs="1" default="1"/>
<xs:element name = "map-link" type = "xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "rock-type" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value=""/> <!-- allow empty -->
<!-- list from UIS entity CA7 www.uisic.uis-speleo.org/exchange/atencode.html#7 -->
<xs:enumeration value="limestone"/>
<xs:enumeration value="dune limestone"/>
<xs:enumeration value="dolomite"/>
<xs:enumeration value="marble"/>
<xs:enumeration value="basalt"/>
<xs:enumeration value="dolerite"/>
<xs:enumeration value="granite"/>
<xs:enumeration value="gypsum"/>
<xs:enumeration value="ice"/>
<xs:enumeration value="lava"/>
<xs:enumeration value="magnesite"/>
<xs:enumeration value="mudstone"/>
<xs:enumeration value="quartzite"/>
<xs:enumeration value="sandstone"/>
<xs:enumeration value="soil"/>
<xs:enumeration value="tuff"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<!-- list from UIS entity CA8 http://www.uisic.uis-speleo.org/exchange/atencode.html#8 -->
<xs:element name="cave-type" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value=""/>
<xs:enumeration value="solution cave"/>
<xs:enumeration value="artificial cave"/>
<xs:enumeration value="boulder cave"/> <!-- also known as 'talus cave' -->
<xs:enumeration value="tectonic cave"/>
<xs:enumeration value="glacier cave"/>
<xs:enumeration value="lava tunnel"/> <!-- also known as 'lava tube' -->
<xs:enumeration value="lava vent"/>
<xs:enumeration value="eolian cave"/>
<xs:enumeration value="sea cave"/> <!-- also known as 'littoral cave' -->
<xs:enumeration value="piping cave"/> <!-- also known as 'suffosional cave' -->
<xs:enumeration value="frost weathering cave"/> <!-- frost wedging -->
<xs:enumeration value="misc. type"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<!-- list shortened from UIS entity CA72 http://www.uisic.uis-speleo.org/exchange/atencode.html#72 -->
<xs:element name="contents" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value=""/>
<xs:enumeration value="extensive guano" />
<xs:enumeration value="many bats" />
<xs:enumeration value="occasional bats" />
<xs:enumeration value="birds" />
<xs:enumeration value="fish" />
<xs:enumeration value="snakes" />
<xs:enumeration value="trogloxenes" />
<xs:enumeration value="accidental trogloxenes" />
<xs:enumeration value="troglophiles" />
<xs:enumeration value="troglobites" />
<xs:enumeration value="charcoal" />
<xs:enumeration value="paintings" />
<xs:enumeration value="minerals" />
<xs:enumeration value="lake(s)" />
<xs:enumeration value="waterfall(s)" />
<xs:enumeration value="permanent ice" />
<xs:enumeration value="periodic ice" />
<xs:enumeration value="tree roots" />
<xs:enumeration value="perennially submerged" />
<xs:enumeration value="intermittently submerged" />
<xs:enumeration value="perennially part-submerged" />
<xs:enumeration value="intermittently part-submerged" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = "comments" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "cave-system" type = "xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name = "branch-name" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name = "reference" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
<!-- list shortened from UIS entity CA41 http://www.uisic.uis-speleo.org/exchange/atencode.html#41 -->
<xs:element name="cave-use" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value=""/>
<xs:enumeration value="guided tourist cave"/>
<xs:enumeration value="self-guided tourist cave"/>
<xs:enumeration value="waste disposal"/>
<xs:enumeration value="habitation"/>
<xs:enumeration value="livestock shelter"/>
<xs:enumeration value="water source"/>
<xs:enumeration value="mine"/>
<xs:enumeration value="shrine"/>
<xs:enumeration value="temple"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = "curation" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>