Debian Codegraph @

gavo/resources/schemata/VOTable.xsd

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--W3C Schema for VOTable = Virtual Observatory Tabular Format
3 .Version 1.0 : 15-Apr-2002
4 .Version 1.09: 23-Jan-2004 Version 1.09
5 .Version 1.09: 30-Jan-2004 Version 1.091
6 .Version 1.09: 22-Mar-2004 Version 1.092
7 .Version 1.094: 02-Jun-2004 GROUP does not contain FIELD
8 .Version 1.1 : 10-Jun-2004 remove the complexContent
9 .Version 1.11: GL: 23-May-2006 remove most root elements, use name= type= iso ref= structure
10 .Version 1.11: GL: 29-Aug-2006 review and added comments (prefixed by GL)
11 before sending to Francois Ochsenbein
12 .Version 1.12: FO: Preliminary Version 1.2
13 .Version 1.18: FO: Tested (jax) version 1.2
14 .Version 1.19: FO: Completed INFO attributes
15 .Version 1.20: FO: Added xtype; content-role is less restrictive (May2009)
16 .Version 1.20a: FO: PR-20090710 Cosmetics.
17 .Version 1.20b: FO: INFO does not accept sub-elements (2009-09-29)
18 .Version 1.20c: FO: elementFormDefault="qualified" to stay compatible with 1.1
19 .Version 1.3: MT: Added BINARY2 element
20 .Version 1.3: MT: Further relaxed LINK content-role type to token
21 .Version 1.3-Erratum-2 MT: Made slight change to precType pattern
22 .Version 1.4pre1: MD: merged 1.3-Erratrum 2, added TIMESYS.
23 .Version 1.4wd-a: TD: updates for initial draft of v1.4.
24 .Version 1.4: TD: Change version to 1.4
25 .Version 1.5pre1: MD: adding refposition attribute and FIELDref/PARAMref
26 in COOSYS, which no longer is derived from xs:string, either.
27 .Version 1.5pre2: MD: vocabularising system attribute in COOSYS
28 .Version 1.5pre3: TD: Undo the FIELDref/PARAMref addition to COOSYS
29 -->
30 <xs:schema
31 xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
32 xmlns="http://www.ivoa.net/xml/VOTable/v1.3"
33 targetNamespace="http://www.ivoa.net/xml/VOTable/v1.3"
34 version="1.5"
35 >
36 <xs:annotation><xs:documentation>
37 VOTable is meant to serialize tabular documents in the
38 context of Virtual Observatory applications. This schema
39 corresponds to the VOTable document available from
40 http://www.ivoa.net/Documents/latest/VOT.html
41 </xs:documentation></xs:annotation>
42
43 <!-- Here we define some interesting new datatypes:
44 - anyTEXT may have embedded XHTML (conforming HTML)
45 - astroYear is an epoch in Besselian or Julian year, e.g. J2000
46 - arrayDEF specifies an array size e.g. 12x23x*
47 - dataType defines the acceptable datatypes
48 - ucdType defines the acceptable UCDs (UCD1+)
49 - precType defines the acceptable precisions
50 - yesno defines just the 2 alternatives
51 -->
52
53 <xs:complexType name="anyTEXT" mixed="true">
54 <xs:sequence>
55 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
56 </xs:sequence>
57 </xs:complexType>
58
59 <xs:simpleType name="astroYear">
60 <xs:restriction base="xs:token">
61 <xs:pattern value="[JB]?[0-9]+([.][0-9]*)?"/>
62 </xs:restriction>
63 </xs:simpleType>
64
65 <xs:simpleType name="ucdType">
66 <xs:restriction base="xs:token">
67 <xs:annotation><xs:documentation>
68 Accept UCD1+
69 Accept also old UCD1 (but not / + %) including SIAP convention (with :)
70 </xs:documentation></xs:annotation>
71 <xs:pattern value="[A-Za-z0-9_.:;\-]*"/><!-- UCD1 use also / + % -->
72 </xs:restriction>
73 </xs:simpleType>
74
75 <xs:simpleType name="arrayDEF">
76 <xs:restriction base="xs:token">
77 <xs:pattern value="([0-9]+x)*[0-9]*[*]?(s\W)?"/>
78 </xs:restriction>
79 </xs:simpleType>
80
81 <xs:simpleType name="encodingType">
82 <xs:restriction base="xs:NMTOKEN">
83 <xs:enumeration value="gzip"/>
84 <xs:enumeration value="base64"/>
85 <xs:enumeration value="dynamic"/>
86 <xs:enumeration value="none"/>
87 </xs:restriction>
88 </xs:simpleType>
89
90 <xs:simpleType name="dataType">
91 <xs:restriction base="xs:NMTOKEN">
92 <xs:enumeration value="boolean"/>
93 <xs:enumeration value="bit"/>
94 <xs:enumeration value="unsignedByte"/>
95 <xs:enumeration value="short"/>
96 <xs:enumeration value="int"/>
97 <xs:enumeration value="long"/>
98 <xs:enumeration value="char"/>
99 <xs:enumeration value="unicodeChar"/>
100 <xs:enumeration value="float"/>
101 <xs:enumeration value="double"/>
102 <xs:enumeration value="floatComplex"/>
103 <xs:enumeration value="doubleComplex"/>
104 </xs:restriction>
105 </xs:simpleType>
106
107 <xs:simpleType name="precType">
108 <xs:restriction base="xs:token">
109 <xs:pattern value="[EF]?[0-9][0-9]*"/>
110 </xs:restriction>
111 </xs:simpleType>
112
113 <xs:simpleType name="yesno">
114 <xs:restriction base="xs:NMTOKEN">
115 <xs:enumeration value="yes"/>
116 <xs:enumeration value="no"/>
117 </xs:restriction>
118 </xs:simpleType>
119
120 <xs:complexType name="Min">
121 <xs:attribute name="value" type="xs:string" use="required"/>
122 <xs:attribute name="inclusive" type="yesno" default="yes"/>
123 </xs:complexType>
124 <xs:complexType name="Max">
125 <xs:attribute name="value" type="xs:string" use="required"/>
126 <xs:attribute name="inclusive" type="yesno" default="yes"/>
127 </xs:complexType>
128 <xs:complexType name="Option">
129 <xs:sequence>
130 <xs:element name="OPTION" type="Option" minOccurs="0" maxOccurs="unbounded"/>
131 </xs:sequence>
132 <xs:attribute name="name" type="xs:token"/>
133 <xs:attribute name="value" type="xs:string" use="required"/>
134 </xs:complexType>
135
136 <!-- VALUES expresses the values that can be taken by the data
137 in a column or by a parameter
138 -->
139 <xs:complexType name="Values">
140 <xs:sequence>
141 <xs:element name="MIN" type="Min" minOccurs="0"/>
142 <xs:element name="MAX" type="Max" minOccurs="0"/>
143 <xs:element name="OPTION" type="Option" minOccurs="0" maxOccurs="unbounded"/>
144 </xs:sequence>
145 <xs:attribute name="ID" type="xs:ID"/>
146 <xs:attribute name="type" default="legal">
147 <xs:simpleType>
148 <xs:restriction base="xs:NMTOKEN">
149 <xs:enumeration value="legal"/>
150 <xs:enumeration value="actual"/>
151 </xs:restriction>
152 </xs:simpleType>
153 </xs:attribute>
154 <xs:attribute name="null" type="xs:token"/>
155 <xs:attribute name="ref" type="xs:IDREF"/>
156 <!-- xs:attribute name="invalid" type="yesno" default="no"/ -->
157 </xs:complexType>
158
159 <!-- The LINK is a URL (href) or some other kind of reference (gref) -->
160 <xs:complexType name="Link">
161 <xs:annotation><xs:documentation>
162 content-role was previsouly restricted as: <![CDATA[
163 <xs:attribute name="content-role">
164 <xs:simpleType>
165 <xs:restriction base="xs:NMTOKEN">
166 <xs:enumeration value="query"/>
167 <xs:enumeration value="hints"/>
168 <xs:enumeration value="doc"/>
169 <xs:enumeration value="location"/>
170 </xs:restriction>
171 </xs:simpleType>
172 </xs:attribute>]]>; is now a token.
173 </xs:documentation></xs:annotation>
174 <xs:attribute name="ID" type="xs:ID"/>
175 <xs:attribute name="content-role" type="xs:token"/>
176 <xs:attribute name="content-type" type="xs:token"/>
177 <xs:attribute name="title" type="xs:string"/>
178 <xs:attribute name="value" type="xs:string"/>
179 <xs:attribute name="href" type="xs:anyURI"/>
180 <xs:attribute name="gref" type="xs:token"/><!-- Deprecated in V1.1 -->
181 <xs:attribute name="action" type="xs:anyURI"/>
182 </xs:complexType>
183
184 <!-- INFO is defined in Version 1.2 as a PARAM of String type
185 <xs:complexType name="Info">
186 <xs:complexContent>
187 <xs:restriction base="Param">
188 <xs:attribute name="unit" fixed=""/>
189 <xs:attribute name="datatype" fixed="char"/>
190 <xs:attribute name="arraysize" fixed="*"/>
191 </xs:restriction>
192 </xs:complexContent>
193 </xs:complexType>
194 -or- as a full definition:
195 <xs:complexType name="Info">
196 <xs:sequence>
197 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
198 <xs:element name="VALUES" type="Values" minOccurs="0"/>
199 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded"/>
200 </xs:sequence>
201 <xs:attribute name="name" type="xs:token" use="required"/>
202 <xs:attribute name="value" type="xs:string" use="required"/>
203 <xs:attribute name="ID" type="xs:ID"/>
204 <xs:attribute name="unit" type="xs:token"/>
205 <xs:attribute name="xtype" type="xs:token"/>
206 <xs:attribute name="ref" type="xs:IDREF"/>
207 <xs:attribute name="ucd" type="ucdType"/>
208 <xs:attribute name="utype" type="xs:string"/>
209 </xs:complexType>
210 -->
211 <!-- No sub-element is accepted in INFO for backward compatibility -->
212 <xs:complexType name="Info">
213 <xs:simpleContent>
214 <xs:extension base="xs:string">
215 <xs:attribute name="ID" type="xs:ID"/>
216 <xs:attribute name="name" type="xs:token" use="required"/>
217 <xs:attribute name="value" type="xs:string" use="required"/>
218 <xs:attribute name="unit" type="xs:token"/>
219 <xs:attribute name="xtype" type="xs:token"/>
220 <xs:attribute name="ref" type="xs:IDREF"/>
221 <xs:attribute name="ucd" type="ucdType"/>
222 <xs:attribute name="utype" type="xs:string"/>
223 </xs:extension>
224 </xs:simpleContent>
225 </xs:complexType>
226
227 <!-- Expresses the coordinate system we are using -->
228 <xs:complexType name="CoordinateSystem">
229 <xs:simpleContent>
230 <xs:extension base="xs:string">
231 <xs:attribute name="ID" type="xs:ID" use="required"/>
232 <xs:attribute name="equinox" type="astroYear"/>
233 <xs:attribute name="epoch" type="astroYear"/>
234 <xs:attribute name="system" default="FK5">
235 <xs:annotation>
236 <xs:documentation>
237 Values for this attribute must be taken from the IVOA
238 refframe vocabulary, http://www.ivoa.net/rdf/refframe
239 </xs:documentation>
240 </xs:annotation>
241 </xs:attribute>
242 <xs:attribute name="refposition" type="xs:token">
243 <xs:annotation>
244 <xs:documentation>
245 The reference position SHOULD be taken from the IVOA
246 refposition vocabulary (http://www.ivoa.net/rdf/refposition).
247 </xs:documentation>
248 </xs:annotation>
249 </xs:attribute>
250 </xs:extension>
251 </xs:simpleContent>
252 </xs:complexType>
253
254 <xs:simpleType name="Timeorigin">
255 <xs:annotation>
256 <xs:documentation>
257 This is a time origin of a time coordinate, given as a
258 Julian Date for the the time scale and reference point
259 defined. It is usually given as a floating point
260 literal; for convenience, the magic strings “MJD-origin”
261 (standing for 2400000.5) and “JD-origin” (standing for 0)
262 are also allowed.
263 </xs:documentation>
264 </xs:annotation>
265 <xs:restriction base="xs:token">
266 <xs:pattern value="[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?|(JD|MJD)-origin">
267 </xs:pattern>
268 </xs:restriction>
269 </xs:simpleType>
270
271 <xs:complexType name="TimeSystem">
272 <xs:simpleContent>
273 <xs:extension base="xs:string">
274 <xs:attribute name="ID" type="xs:ID" use="required"/>
275 <xs:attribute name="timeorigin" type="Timeorigin">
276 <xs:annotation>
277 <xs:documentation>
278 The time origin is the offset or the time coordinate to Julian
279 Date. The timeorigin attribute MUST be given unless the time's
280 representation contains a year of a calendar era, in which case it
281 MUST NOT be present.
282 </xs:documentation>
283 </xs:annotation>
284 </xs:attribute>
285 <xs:attribute name="timescale" use="required" type="xs:token">
286 <xs:annotation>
287 <xs:documentation>
288 This is the time scale used. Values SHOULD be
289 taken from the IVOA timescale vocabulary (http://www.ivoa.net/rdf/timescale).
290 </xs:documentation>
291 </xs:annotation>
292 </xs:attribute>
293 <xs:attribute name="refposition" use="required" type="xs:token">
294 <xs:annotation>
295 <xs:documentation>
296 The reference position SHOULD be taken from the IVOA
297 refposition vocabulary (http://www.ivoa.net/rdf/refposition).
298 </xs:documentation>
299 </xs:annotation>
300 </xs:attribute>
301 </xs:extension>
302 </xs:simpleContent>
303 </xs:complexType>
304
305 <xs:complexType name="Definitions">
306 <xs:annotation><xs:documentation>
307 Deprecated in Version 1.1
308 </xs:documentation></xs:annotation>
309 <xs:choice minOccurs="0" maxOccurs="unbounded">
310 <xs:element name="COOSYS" type="CoordinateSystem"/>
311 <xs:element name="TIMESYS" type="TimeSystem"/>
312 <xs:element name="PARAM" type="Param"/>
313 </xs:choice>
314 </xs:complexType>
315
316 <!-- FIELD is the definition of what is in a column of the table -->
317 <xs:complexType name="Field">
318 <xs:sequence> <!-- minOccurs="0" maxOccurs="unbounded" -->
319 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
320 <xs:element name="VALUES" type="Values" minOccurs="0"/> <!-- maxOccurs="2" -->
321 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded"/>
322 </xs:sequence>
323 <xs:attribute name="ID" type="xs:ID"/>
324 <xs:attribute name="unit" type="xs:token"/>
325 <xs:attribute name="datatype" type="dataType" use="required"/>
326 <xs:attribute name="precision" type="precType"/>
327 <xs:attribute name="width" type="xs:positiveInteger"/>
328 <xs:attribute name="xtype" type="xs:token"/>
329 <xs:attribute name="ref" type="xs:IDREF"/>
330 <xs:attribute name="name" type="xs:token" use="required"/>
331 <xs:attribute name="ucd" type="ucdType"/>
332 <xs:attribute name="utype" type="xs:string"/>
333 <xs:attribute name="arraysize" type="xs:string"/>
334 <!-- GL: is the next deprecated element remaining
335 (is not in PARAM, but will in new model be inherited)
336 -->
337 <xs:attribute name="type">
338 <!-- type is not in the Version 1.1, but is kept for
339 backward compatibility purposes
340 -->
341 <xs:simpleType>
342 <xs:restriction base="xs:NMTOKEN">
343 <xs:enumeration value="hidden"/>
344 <xs:enumeration value="no_query"/>
345 <xs:enumeration value="trigger"/>
346 <xs:enumeration value="location"/>
347 </xs:restriction>
348 </xs:simpleType>
349 </xs:attribute>
350 </xs:complexType>
351
352
353 <!-- A PARAM is similar to a FIELD, but it also has a "value" attribute -->
354 <!-- GL: implemented here as a subtype as suggested we do in Kyoto. -->
355 <xs:complexType name="Param">
356 <xs:complexContent>
357 <xs:extension base="Field">
358 <xs:attribute name="value" type="xs:string" use="required"/>
359 </xs:extension>
360 </xs:complexContent>
361 </xs:complexType>
362
363
364 <!-- GROUP groups columns; may include descriptions, fields/params/groups -->
365 <xs:complexType name="Group">
366 <xs:sequence>
367 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
368 <!-- GL I guess I can understand the next choice element as one may (?)
369 really want to group fields and params and groups in a particular order.
370 -->
371 <xs:choice minOccurs="0" maxOccurs="unbounded">
372 <xs:element name="FIELDref" type="FieldRef"/>
373 <xs:element name="PARAMref" type="ParamRef"/>
374 <xs:element name="PARAM" type="Param"/>
375 <xs:element name="GROUP" type="Group"/>
376 <!-- GL a GroupRef could remove recursion -->
377 </xs:choice>
378 </xs:sequence>
379 <xs:attribute name="ID" type="xs:ID"/>
380 <xs:attribute name="name" type="xs:token"/>
381 <xs:attribute name="ref" type="xs:IDREF"/>
382 <xs:attribute name="ucd" type="ucdType"/>
383 <xs:attribute name="utype" type="xs:string"/>
384 </xs:complexType>
385
386 <!-- FIELDref and PARAMref are references to FIELD or PARAM defined
387 in the parent TABLE or RESOURCE -->
388 <!-- GL This can not be enforced in XML Schema, so why not IDREF in <Group> ?
389 In particular if the UCD and utype attributes will NOT be added -->
390 <xs:complexType name="FieldRef">
391 <xs:attribute name="ref" type="xs:IDREF" use="required"/>
392 <xs:attribute name="ucd" type="ucdType"/>
393 <xs:attribute name="utype" type="xs:string"/>
394 </xs:complexType>
395
396 <xs:complexType name="ParamRef">
397 <xs:attribute name="ref" type="xs:IDREF" use="required"/>
398 <xs:attribute name="ucd" type="ucdType"/>
399 <xs:attribute name="utype" type="xs:string"/>
400 </xs:complexType>
401
402 <!-- DATA is the actual table data, in one of three formats -->
403 <!--
404 GL in Kyoto we discussed the option of having the specific Data items
405 be subtypes of Data:
406 -->
407 <!--
408 <xs:complexType name="Data" abstract="true"/>
409
410 <xs:complexType name="TableData">
411 <xs:complexContent>
412 <xs:extension base="Data">
413 ... etc
414 </xs:extension>
415 </xs:complexContent>
416 </xs:complexType>
417 -->
418 <xs:complexType name="Data">
419 <xs:annotation><xs:documentation>
420 Added in Version 1.2: INFO for diagnostics
421 </xs:documentation></xs:annotation>
422 <xs:sequence>
423 <xs:choice>
424 <xs:element name="TABLEDATA" type="TableData"/>
425 <xs:element name="BINARY" type="Binary"/>
426 <xs:element name="BINARY2" type="Binary2"/>
427 <xs:element name="FITS" type="FITS"/>
428 </xs:choice>
429 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
430 </xs:sequence>
431 </xs:complexType>
432
433 <!-- Pure XML data -->
434 <xs:complexType name="TableData">
435 <xs:sequence>
436 <xs:element name="TR" type="Tr" minOccurs="0" maxOccurs="unbounded"/>
437 </xs:sequence>
438 </xs:complexType>
439
440 <xs:complexType name="Td">
441 <xs:simpleContent>
442 <xs:extension base="xs:string">
443 <!-- xs:attribute name="ref" type="xs:IDREF"/ -->
444 <xs:annotation><xs:documentation>
445 The 'encoding' attribute is added here to avoid
446 problems of code generators which do not properly
447 interpret the TR/TD structures.
448 'encoding' was chosen because it appears in
449 appendix A.5
450 </xs:documentation></xs:annotation>
451 <xs:attribute name="encoding" type="encodingType"/>
452 </xs:extension>
453 </xs:simpleContent>
454 </xs:complexType>
455
456 <xs:complexType name="Tr">
457 <xs:annotation><xs:documentation>
458 The ID attribute is added here to the TR tag to avoid
459 problems of code generators which do not properly
460 interpret the TR/TD structures
461 </xs:documentation></xs:annotation>
462 <xs:sequence>
463 <xs:element name="TD" type="Td" maxOccurs="unbounded"/>
464 </xs:sequence>
465 <xs:attribute name="ID" type="xs:ID"/>
466 </xs:complexType>
467
468 <!-- FITS file, perhaps with specification of which extension to seek to -->
469 <xs:complexType name="FITS">
470 <xs:sequence>
471 <xs:element name="STREAM" type="Stream"/>
472 </xs:sequence>
473 <xs:attribute name="extnum" type="xs:positiveInteger"/>
474 </xs:complexType>
475
476 <!-- BINARY data format -->
477 <xs:complexType name="Binary">
478 <xs:sequence>
479 <xs:element name="STREAM" type="Stream"/>
480 </xs:sequence>
481 </xs:complexType>
482
483 <!-- BINARY2 data format -->
484 <xs:complexType name="Binary2">
485 <xs:sequence>
486 <xs:element name="STREAM" type="Stream"/>
487 </xs:sequence>
488 </xs:complexType>
489
490 <!-- STREAM can be local or remote, encoded or not -->
491 <xs:complexType name="Stream">
492 <xs:simpleContent>
493 <xs:extension base="xs:string">
494 <xs:attribute name="type" default="locator">
495 <xs:simpleType>
496 <xs:restriction base="xs:NMTOKEN">
497 <xs:enumeration value="locator"/>
498 <xs:enumeration value="other"/>
499 </xs:restriction>
500 </xs:simpleType>
501 </xs:attribute>
502 <xs:attribute name="href" type="xs:anyURI"/>
503 <xs:attribute name="actuate" default="onRequest">
504 <xs:simpleType>
505 <xs:restriction base="xs:NMTOKEN">
506 <xs:enumeration value="onLoad"/>
507 <xs:enumeration value="onRequest"/>
508 <xs:enumeration value="other"/>
509 <xs:enumeration value="none"/>
510 </xs:restriction>
511 </xs:simpleType>
512 </xs:attribute>
513 <xs:attribute name="encoding" type="encodingType" default="none"/>
514 <xs:attribute name="expires" type="xs:dateTime"/>
515 <xs:attribute name="rights" type="xs:token"/>
516 </xs:extension>
517 </xs:simpleContent>
518 </xs:complexType>
519
520 <!-- A TABLE is a sequence of FIELD/PARAMs and LINKS and DESCRIPTION,
521 possibly followed by a DATA section
522 -->
523 <xs:complexType name="Table">
524 <xs:annotation><xs:documentation>
525 Added in Version 1.2: INFO for diagnostics
526 </xs:documentation></xs:annotation>
527 <xs:sequence>
528 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
529 <!-- GL: why a choice iso for example -->
530 <!--
531 <xs:element name="PARAM" type="Param" minOccurs="0" maxOccurs="unbounded"/>
532 <xs:element name="FIELD" type="Field" minOccurs="0" maxOccurs="unbounded"/>
533 <xs:element name="GROUP" type="Group" minOccurs="0" maxOccurs="unbounded"/>
534 -->
535 <!--
536 This could also enforce groups to be defined after the fields and params
537 to which they must have a reference, which is somewhat more logical
538 -->
539 <!-- Added Version 1.2: -->
540 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
541 <!-- An empty table without any FIELD/PARAM should not be acceptable -->
542 <xs:choice minOccurs="1" maxOccurs="unbounded">
543 <xs:element name="FIELD" type="Field"/>
544 <xs:element name="PARAM" type="Param"/>
545 <xs:element name="GROUP" type="Group"/>
546 </xs:choice>
547 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded"/>
548 <!-- This would allow several DATA parts in a table (future extension?)
549 <xs:sequence minOccurs="0" maxOccurs="unbounded">
550 <xs:element name="DATA" type="Data"/>
551 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
552 </xs:sequence>
553 -->
554 <xs:element name="DATA" type="Data" minOccurs="0"/>
555 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
556 </xs:sequence>
557 <xs:attribute name="ID" type="xs:ID"/>
558 <xs:attribute name="name" type="xs:token"/>
559 <xs:attribute name="ref" type="xs:IDREF"/>
560 <xs:attribute name="ucd" type="ucdType"/>
561 <xs:attribute name="utype" type="xs:string"/>
562 <xs:attribute name="nrows" type="xs:nonNegativeInteger"/>
563 </xs:complexType>
564
565 <!-- RESOURCES can contain DESCRIPTION, (INFO|PARAM|COSYS), LINK, TABLEs -->
566 <xs:complexType name="Resource">
567 <xs:annotation><xs:documentation>
568 Added in Version 1.2: INFO for diagnostics in several places
569 </xs:documentation></xs:annotation>
570 <xs:sequence>
571 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
572 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
573 <xs:choice minOccurs="0" maxOccurs="unbounded">
574 <xs:element name="COOSYS" type="CoordinateSystem"/>
575 <xs:element name="TIMESYS" type="TimeSystem"/>
576 <xs:element name="GROUP" type="Group" />
577 <xs:element name="PARAM" type="Param" />
578 </xs:choice>
579 <xs:sequence minOccurs="0" maxOccurs="unbounded">
580 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded"/>
581 <xs:choice>
582 <xs:element name="TABLE" type="Table" />
583 <xs:element name="RESOURCE" type="Resource" />
584 </xs:choice>
585 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
586 </xs:sequence>
587 <!-- Suggested Doug Tody, to include new RESOURCE types -->
588 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
589 </xs:sequence>
590 <xs:attribute name="name" type="xs:token"/>
591 <xs:attribute name="ID" type="xs:ID"/>
592 <xs:attribute name="utype" type="xs:string"/>
593 <xs:attribute name="type" default="results">
594 <xs:simpleType>
595 <xs:restriction base="xs:NMTOKEN">
596 <xs:enumeration value="results"/>
597 <xs:enumeration value="meta"/>
598 </xs:restriction>
599 </xs:simpleType>
600 </xs:attribute>
601 <!-- Suggested Doug Tody, to include new RESOURCE attributes -->
602 <xs:anyAttribute namespace="##other" processContents="lax"/>
603 </xs:complexType>
604
605 <!-- VOTable is the root element -->
606 <xs:element name="VOTABLE">
607 <xs:complexType>
608 <xs:sequence>
609 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/>
610 <xs:element name="DEFINITIONS" type="Definitions" minOccurs="0"/><!-- Deprecated -->
611 <xs:choice minOccurs="0" maxOccurs="unbounded">
612 <xs:element name="COOSYS" type="CoordinateSystem"/>
613 <xs:element name="TIMESYS" type="TimeSystem"/>
614 <xs:element name="GROUP" type="Group" />
615 <xs:element name="PARAM" type="Param" />
616 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
617 </xs:choice>
618 <xs:element name="RESOURCE" type="Resource" minOccurs="1" maxOccurs="unbounded"/>
619 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/>
620 </xs:sequence>
621 <xs:attribute name="ID" type="xs:ID"/>
622 <xs:attribute name="version">
623 <xs:simpleType>
624 <xs:restriction base="xs:NMTOKEN">
625 <xs:enumeration value="1.3"/>
626 <xs:enumeration value="1.4"/>
627 <xs:enumeration value="1.5"/>
628 </xs:restriction>
629 </xs:simpleType>
630 </xs:attribute>
631 </xs:complexType>
632 </xs:element>
633
634 </xs:schema>