/[volute]/trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.3_vodmlAlt-GL-1type.xsd
ViewVC logotype

Contents of /trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.3_vodmlAlt-GL-1type.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3835 - (show annotations)
Tue Jan 24 14:09:14 2017 UTC (4 years, 6 months ago) by gerard.lemson
File size: 37264 byte(s)


1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--W3C Schema for VOTable = Virtual Observatory Tabular Format .Version 1.0 : 15-Apr-2002 .Version 1.09: 23-Jan-2004 Version
3 1.09 .Version 1.09: 30-Jan-2004 Version 1.091 .Version 1.09: 22-Mar-2004 Version 1.092 .Version 1.094: 02-Jun-2004 GROUP
4 does not contain FIELD .Version 1.1 : 10-Jun-2004 remove the complexContent .Version 1.11: GL: 23-May-2006 remove most root
5 elements, use name= type= iso ref= structure .Version 1.11: GL: 29-Aug-2006 review and added comments (prefixed by GL) before
6 sending to Francois Ochsenbein .Version 1.12: FO: Preliminary Version 1.2 .Version 1.18: FO: Tested (jax) version 1.2 .Version
7 1.19: FO: Completed INFO attributes .Version 1.20: FO: Added xtype; content-role is less restrictive (May2009) .Version 1.20a:
8 FO: PR-20090710 Cosmetics. .Version 1.20b: FO: INFO does not accept sub-elements (2009-09-29) .Version 1.20c: FO: elementFormDefault="qualified"
9 to stay compatible with 1.1 .Version 1.3: MT: Added BINARY2 element .Version 1.3: MT: Further relaxed LINK content-role type
10 to token -->
11 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
12 xmlns="http://www.ivoa.net/xml/VOTable/v1.3_vodml" targetNamespace="http://www.ivoa.net/xml/VOTable/v1.3_vodml">
13 <xs:annotation>
14 <xs:documentation>
15 VOTable is meant to serialize tabular documents in the
16 context of Virtual Observatory applications. This schema
17 corresponds to the VOTable document available from
18 http://www.ivoa.net/Documents/latest/VOT.html
19 </xs:documentation>
20 </xs:annotation>
21 <!-- Here we define some interesting new datatypes: - anyTEXT may have embedded XHTML (conforming HTML) - astroYear is an
22 epoch in Besselian or Julian year, e.g. J2000 - arrayDEF specifies an array size e.g. 12x23x* - dataType defines the acceptable
23 datatypes - ucdType defines the acceptable UCDs (UCD1+) - precType defines the acceptable precisions - yesno defines just
24 the 2 alternatives -->
25 <xs:complexType name="anyTEXT" mixed="true">
26 <xs:sequence>
27 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
28 </xs:sequence>
29 </xs:complexType>
30 <xs:simpleType name="astroYear">
31 <xs:restriction base="xs:token">
32 <xs:pattern value="[JB]?[0-9]+([.][0-9]*)?" />
33 </xs:restriction>
34 </xs:simpleType>
35 <xs:simpleType name="ucdType">
36 <xs:restriction base="xs:token">
37 <xs:annotation>
38 <xs:documentation>
39 Accept UCD1+
40 Accept also old UCD1 (but not / + %) including SIAP convention (with :)
41 </xs:documentation>
42 </xs:annotation>
43 <xs:pattern value="[A-Za-z0-9_.:;\-]*" />
44 <!-- UCD1 use also / + % -->
45 </xs:restriction>
46 </xs:simpleType>
47 <xs:simpleType name="arrayDEF">
48 <xs:restriction base="xs:token">
49 <xs:pattern value="([0-9]+x)*[0-9]*[*]?(s\W)?" />
50 </xs:restriction>
51 </xs:simpleType>
52 <xs:simpleType name="encodingType">
53 <xs:restriction base="xs:NMTOKEN">
54 <xs:enumeration value="gzip" />
55 <xs:enumeration value="base64" />
56 <xs:enumeration value="dynamic" />
57 <xs:enumeration value="none" />
58 </xs:restriction>
59 </xs:simpleType>
60 <xs:simpleType name="dataType">
61 <xs:restriction base="xs:NMTOKEN">
62 <xs:enumeration value="boolean" />
63 <xs:enumeration value="bit" />
64 <xs:enumeration value="unsignedByte" />
65 <xs:enumeration value="short" />
66 <xs:enumeration value="int" />
67 <xs:enumeration value="long" />
68 <xs:enumeration value="char" />
69 <xs:enumeration value="unicodeChar" />
70 <xs:enumeration value="float" />
71 <xs:enumeration value="double" />
72 <xs:enumeration value="floatComplex" />
73 <xs:enumeration value="doubleComplex" />
74 </xs:restriction>
75 </xs:simpleType>
76 <xs:simpleType name="precType">
77 <xs:restriction base="xs:token">
78 <xs:pattern value="[EF]?[1-9][0-9]*" />
79 </xs:restriction>
80 </xs:simpleType>
81 <xs:simpleType name="yesno">
82 <xs:restriction base="xs:NMTOKEN">
83 <xs:enumeration value="yes" />
84 <xs:enumeration value="no" />
85 </xs:restriction>
86 </xs:simpleType>
87 <xs:complexType name="Min">
88 <xs:attribute name="value" type="xs:string" use="required" />
89 <xs:attribute name="inclusive" type="yesno" default="yes" />
90 </xs:complexType>
91 <xs:complexType name="Max">
92 <xs:attribute name="value" type="xs:string" use="required" />
93 <xs:attribute name="inclusive" type="yesno" default="yes" />
94 </xs:complexType>
95 <xs:complexType name="Option">
96 <xs:sequence>
97 <xs:element name="OPTION" type="Option" minOccurs="0" maxOccurs="unbounded" />
98 </xs:sequence>
99 <xs:attribute name="name" type="xs:token" />
100 <xs:attribute name="value" type="xs:string" use="required" />
101 </xs:complexType>
102 <!-- VALUES expresses the values that can be taken by the data in a column or by a parameter -->
103 <xs:complexType name="Values">
104 <xs:sequence>
105 <xs:element name="MIN" type="Min" minOccurs="0" />
106 <xs:element name="MAX" type="Max" minOccurs="0" />
107 <xs:element name="OPTION" type="Option" minOccurs="0" maxOccurs="unbounded" />
108 </xs:sequence>
109 <xs:attribute name="ID" type="xs:ID" />
110 <xs:attribute name="type" default="legal">
111 <xs:simpleType>
112 <xs:restriction base="xs:NMTOKEN">
113 <xs:enumeration value="legal" />
114 <xs:enumeration value="actual" />
115 </xs:restriction>
116 </xs:simpleType>
117 </xs:attribute>
118 <xs:attribute name="null" type="xs:token" />
119 <xs:attribute name="ref" type="xs:IDREF" />
120 <!-- xs:attribute name="invalid" type="yesno" default="no"/ -->
121 </xs:complexType>
122 <!-- The LINK is a URL (href) or some other kind of reference (gref) -->
123 <xs:complexType name="Link">
124 <xs:annotation>
125 <xs:documentation>
126 content-role was previsouly restricted as: <![CDATA[
127 <xs:attribute name="content-role">
128 <xs:simpleType>
129 <xs:restriction base="xs:NMTOKEN">
130 <xs:enumeration value="query"/>
131 <xs:enumeration value="hints"/>
132 <xs:enumeration value="doc"/>
133 <xs:enumeration value="location"/>
134 </xs:restriction>
135 </xs:simpleType>
136 </xs:attribute>]]>;
137 is now a token.
138 </xs:documentation>
139 </xs:annotation>
140 <xs:attribute name="ID" type="xs:ID" />
141 <xs:attribute name="content-role" type="xs:token" />
142 <xs:attribute name="content-type" type="xs:token" />
143 <xs:attribute name="title" type="xs:string" />
144 <xs:attribute name="value" type="xs:string" />
145 <xs:attribute name="href" type="xs:anyURI" />
146 <xs:attribute name="gref" type="xs:token" />
147 <!-- Deprecated in V1.1 -->
148 <xs:attribute name="action" type="xs:anyURI" />
149 </xs:complexType>
150 <!-- INFO is defined in Version 1.2 as a PARAM of String type <xs:complexType name="Info"> <xs:complexContent> <xs:restriction
151 base="Param"> <xs:attribute name="unit" fixed=""/> <xs:attribute name="datatype" fixed="char"/> <xs:attribute name="arraysize"
152 fixed="*"/> </xs:restriction> </xs:complexContent> </xs:complexType> -or- as a full definition: <xs:complexType name="Info">
153 <xs:sequence> <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0"/> <xs:element name="VALUES" type="Values" minOccurs="0"/>
154 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:token"
155 use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> <xs:attribute name="ID" type="xs:ID"/> <xs:attribute
156 name="unit" type="xs:token"/> <xs:attribute name="xtype" type="xs:token"/> <xs:attribute name="ref" type="xs:IDREF"/> <xs:attribute
157 name="ucd" type="ucdType"/> <xs:attribute name="utype" type="xs:string"/> </xs:complexType> -->
158 <!-- No sub-element is accepted in INFO for backward compatibility -->
159 <xs:complexType name="Info">
160 <xs:simpleContent>
161 <xs:extension base="xs:string">
162 <xs:attribute name="ID" type="xs:ID" />
163 <xs:attribute name="name" type="xs:token" use="required" />
164 <xs:attribute name="value" type="xs:string" use="required" />
165 <xs:attribute name="unit" type="xs:token" />
166 <xs:attribute name="xtype" type="xs:token" />
167 <xs:attribute name="ref" type="xs:IDREF" />
168 <xs:attribute name="ucd" type="ucdType" />
169 <xs:attribute name="utype" type="xs:string" />
170 </xs:extension>
171 </xs:simpleContent>
172 </xs:complexType>
173 <!-- Expresses the coordinate system we are using -->
174 <!-- Deprecated V1.2 -->
175 <xs:complexType name="CoordinateSystem">
176 <xs:annotation>
177 <xs:documentation>
178 Deprecated in Version 1.2
179 </xs:documentation>
180 </xs:annotation>
181 <xs:simpleContent>
182 <xs:extension base="xs:string">
183 <xs:attribute name="ID" type="xs:ID" use="required" />
184 <xs:attribute name="equinox" type="astroYear" />
185 <xs:attribute name="epoch" type="astroYear" />
186 <xs:attribute name="system" default="eq_FK5">
187 <xs:simpleType>
188 <xs:restriction base="xs:NMTOKEN">
189 <xs:enumeration value="eq_FK4" />
190 <xs:enumeration value="eq_FK5" />
191 <xs:enumeration value="ICRS" />
192 <xs:enumeration value="ecl_FK4" />
193 <xs:enumeration value="ecl_FK5" />
194 <xs:enumeration value="galactic" />
195 <xs:enumeration value="supergalactic" />
196 <xs:enumeration value="xy" />
197 <xs:enumeration value="barycentric" />
198 <xs:enumeration value="geo_app" />
199 </xs:restriction>
200 </xs:simpleType>
201 </xs:attribute>
202 </xs:extension>
203 </xs:simpleContent>
204 </xs:complexType>
205 <xs:complexType name="Definitions">
206 <xs:annotation>
207 <xs:documentation>
208 Deprecated in Version 1.1
209 </xs:documentation>
210 </xs:annotation>
211 <xs:choice minOccurs="0" maxOccurs="unbounded">
212 <xs:element name="COOSYS" type="CoordinateSystem" />
213 <!-- Deprecated in V1.2 -->
214 <xs:element name="PARAM" type="Param" />
215 </xs:choice>
216 </xs:complexType>
217 <!-- FIELD is the definition of what is in a column of the table -->
218 <xs:complexType name="Field">
219 <xs:sequence>
220 <!-- minOccurs="0" maxOccurs="unbounded" -->
221 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
222 <xs:element name="VALUES" type="Values" minOccurs="0" />
223 <!-- maxOccurs="2" -->
224 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded" />
225 </xs:sequence>
226 <xs:attribute name="ID" type="xs:ID" />
227 <xs:attribute name="unit" type="xs:token" />
228 <xs:attribute name="datatype" type="dataType" use="required" />
229 <xs:attribute name="precision" type="precType" />
230 <xs:attribute name="width" type="xs:positiveInteger" />
231 <xs:attribute name="xtype" type="xs:token" />
232 <xs:attribute name="ref" type="xs:IDREF" />
233 <xs:attribute name="name" type="xs:token" use="required" />
234 <xs:attribute name="ucd" type="ucdType" />
235 <xs:attribute name="utype" type="xs:string" />
236 <xs:attribute name="arraysize" type="xs:string" />
237 <!-- GL: is the next deprecated element remaining (is not in PARAM, but will in new model be inherited) -->
238 <xs:attribute name="type">
239 <!-- type is not in the Version 1.1, but is kept for backward compatibility purposes -->
240 <xs:simpleType>
241 <xs:restriction base="xs:NMTOKEN">
242 <xs:enumeration value="hidden" />
243 <xs:enumeration value="no_query" />
244 <xs:enumeration value="trigger" />
245 <xs:enumeration value="location" />
246 </xs:restriction>
247 </xs:simpleType>
248 </xs:attribute>
249 </xs:complexType>
250 <!-- A PARAM is similar to a FIELD, but it also has a "value" attribute -->
251 <!-- GL: implemented here as a subtype as suggested we do in Kyoto. -->
252 <xs:complexType name="Param">
253 <xs:complexContent>
254 <xs:extension base="Field">
255 <xs:attribute name="value" type="xs:string" use="required" />
256 </xs:extension>
257 </xs:complexContent>
258 </xs:complexType>
259 <!-- GROUP groups columns; may include descriptions, fields/params/groups -->
260 <xs:complexType name="Group">
261 <xs:sequence>
262 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
263 <!-- GL I guess I can understand the next choice element as one may (?) really want to group fields and params and groups
264 in a particular order. -->
265 <xs:choice minOccurs="0" maxOccurs="unbounded">
266 <xs:element name="FIELDref" type="FieldRef" />
267 <xs:element name="PARAMref" type="ParamRef" />
268 <xs:element name="PARAM" type="Param" />
269 <xs:element name="GROUP" type="Group" />
270 <!-- GL a GroupRef could remove recursion -->
271 </xs:choice>
272 </xs:sequence>
273 <xs:attribute name="ID" type="xs:ID" />
274 <xs:attribute name="name" type="xs:token" />
275 <xs:attribute name="ref" type="xs:IDREF" />
276 <xs:attribute name="ucd" type="ucdType" />
277 <xs:attribute name="utype" type="xs:string" />
278 </xs:complexType>
279 <!-- FIELDref and PARAMref are references to FIELD or PARAM defined in the parent TABLE or RESOURCE -->
280 <!-- GL This can not be enforced in XML Schema, so why not IDREF in <Group> ? In particular if the UCD and utype attributes
281 will NOT be added -->
282 <xs:complexType name="FieldRef">
283 <xs:attribute name="ref" type="xs:IDREF" use="required" />
284 <xs:attribute name="ucd" type="ucdType" />
285 <xs:attribute name="utype" type="xs:string" />
286 </xs:complexType>
287 <xs:complexType name="ParamRef">
288 <xs:attribute name="ref" type="xs:IDREF" use="required" />
289 <xs:attribute name="ucd" type="ucdType" />
290 <xs:attribute name="utype" type="xs:string" />
291 </xs:complexType>
292 <!-- DATA is the actual table data, in one of three formats -->
293 <!-- GL in Kyoto we discussed the option of having the specific Data items be subtypes of Data: -->
294 <!-- <xs:complexType name="Data" abstract="true"/> <xs:complexType name="TableData"> <xs:complexContent> <xs:extension base="Data">
295 ... etc </xs:extension> </xs:complexContent> </xs:complexType> -->
296 <xs:complexType name="Data">
297 <xs:annotation>
298 <xs:documentation>
299 Added in Version 1.2: INFO for diagnostics
300 </xs:documentation>
301 </xs:annotation>
302 <xs:sequence>
303 <xs:choice>
304 <xs:element name="TABLEDATA" type="TableData" />
305 <xs:element name="BINARY" type="Binary" />
306 <xs:element name="BINARY2" type="Binary2" />
307 <xs:element name="FITS" type="FITS" />
308 </xs:choice>
309 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
310 </xs:sequence>
311 </xs:complexType>
312 <!-- Pure XML data -->
313 <xs:complexType name="TableData">
314 <xs:sequence>
315 <xs:element name="TR" type="Tr" minOccurs="0" maxOccurs="unbounded" />
316 </xs:sequence>
317 </xs:complexType>
318 <xs:complexType name="Td">
319 <xs:simpleContent>
320 <xs:extension base="xs:string">
321 <!-- xs:attribute name="ref" type="xs:IDREF"/ -->
322 <xs:annotation>
323 <xs:documentation>
324 The 'encoding' attribute is added here to avoid
325 problems of code generators which do not properly
326 interpret the TR/TD structures.
327 'encoding' was chosen because it appears in
328 appendix A.5
329 </xs:documentation>
330 </xs:annotation>
331 <xs:attribute name="encoding" type="encodingType" />
332 </xs:extension>
333 </xs:simpleContent>
334 </xs:complexType>
335 <xs:complexType name="Tr">
336 <xs:annotation>
337 <xs:documentation>
338 The ID attribute is added here to the TR tag to avoid
339 problems of code generators which do not properly
340 interpret the TR/TD structures
341 </xs:documentation>
342 </xs:annotation>
343 <xs:sequence>
344 <xs:element name="TD" type="Td" maxOccurs="unbounded" />
345 </xs:sequence>
346 <xs:attribute name="ID" type="xs:ID" />
347 </xs:complexType>
348 <!-- FITS file, perhaps with specification of which extension to seek to -->
349 <xs:complexType name="FITS">
350 <xs:sequence>
351 <xs:element name="STREAM" type="Stream" />
352 </xs:sequence>
353 <xs:attribute name="extnum" type="xs:positiveInteger" />
354 </xs:complexType>
355 <!-- BINARY data format -->
356 <xs:complexType name="Binary">
357 <xs:sequence>
358 <xs:element name="STREAM" type="Stream" />
359 </xs:sequence>
360 </xs:complexType>
361 <!-- BINARY2 data format -->
362 <xs:complexType name="Binary2">
363 <xs:sequence>
364 <xs:element name="STREAM" type="Stream" />
365 </xs:sequence>
366 </xs:complexType>
367 <!-- STREAM can be local or remote, encoded or not -->
368 <xs:complexType name="Stream">
369 <xs:simpleContent>
370 <xs:extension base="xs:string">
371 <xs:attribute name="type" default="locator">
372 <xs:simpleType>
373 <xs:restriction base="xs:NMTOKEN">
374 <xs:enumeration value="locator" />
375 <xs:enumeration value="other" />
376 </xs:restriction>
377 </xs:simpleType>
378 </xs:attribute>
379 <xs:attribute name="href" type="xs:anyURI" />
380 <xs:attribute name="actuate" default="onRequest">
381 <xs:simpleType>
382 <xs:restriction base="xs:NMTOKEN">
383 <xs:enumeration value="onLoad" />
384 <xs:enumeration value="onRequest" />
385 <xs:enumeration value="other" />
386 <xs:enumeration value="none" />
387 </xs:restriction>
388 </xs:simpleType>
389 </xs:attribute>
390 <xs:attribute name="encoding" type="encodingType" default="none" />
391 <xs:attribute name="expires" type="xs:dateTime" />
392 <xs:attribute name="rights" type="xs:token" />
393 </xs:extension>
394 </xs:simpleContent>
395 </xs:complexType>
396 <!-- A TABLE is a sequence of FIELD/PARAMs and LINKS and DESCRIPTION, possibly followed by a DATA section -->
397 <xs:complexType name="Table">
398 <xs:annotation>
399 <xs:documentation>
400 Added in Version 1.2: INFO for diagnostics
401 </xs:documentation>
402 </xs:annotation>
403 <xs:sequence>
404 <xs:element name="VODML_INSTANCE_TEMPLATES" type="VODMLInstanceTemplates" minOccurs="0" />
405 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
406 <!-- GL: why a choice iso for example -->
407 <!-- <xs:element name="PARAM" type="Param" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="FIELD" type="Field"
408 minOccurs="0" maxOccurs="unbounded"/> <xs:element name="GROUP" type="Group" minOccurs="0" maxOccurs="unbounded"/> -->
409 <!-- This could also enforce groups to be defined after the fields and params to which they must have a reference, which
410 is somewhat more logical -->
411 <!-- Added Version 1.2: -->
412 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
413 <!-- An empty table without any FIELD/PARAM should not be acceptable -->
414 <xs:choice minOccurs="1" maxOccurs="unbounded">
415 <xs:element name="FIELD" type="Field" />
416 <xs:element name="PARAM" type="Param" />
417 <xs:element name="GROUP" type="Group" />
418 </xs:choice>
419 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded" />
420 <!-- This would allow several DATA parts in a table (future extension?) <xs:sequence minOccurs="0" maxOccurs="unbounded">
421 <xs:element name="DATA" type="Data"/> <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> -->
422 <xs:element name="DATA" type="Data" minOccurs="0" />
423 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
424 </xs:sequence>
425 <xs:attribute name="ID" type="xs:ID" />
426 <xs:attribute name="name" type="xs:token" />
427 <xs:attribute name="ref" type="xs:IDREF" />
428 <xs:attribute name="ucd" type="ucdType" />
429 <xs:attribute name="utype" type="xs:string" />
430 <xs:attribute name="nrows" type="xs:nonNegativeInteger" />
431 </xs:complexType>
432 <!-- RESOURCES can contain DESCRIPTION, (INFO|PARAM|COSYS), LINK, TABLEs -->
433 <xs:complexType name="Resource">
434 <xs:annotation>
435 <xs:documentation>
436 Added in Version 1.2: INFO for diagnostics in several places
437 </xs:documentation>
438 </xs:annotation>
439 <xs:sequence>
440 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
441 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
442 <xs:choice minOccurs="0" maxOccurs="unbounded">
443 <xs:element name="COOSYS" type="CoordinateSystem" />
444 <!-- Deprecated in V1.2 -->
445 <xs:element name="GROUP" type="Group" />
446 <xs:element name="PARAM" type="Param" />
447 </xs:choice>
448 <xs:sequence minOccurs="0" maxOccurs="unbounded">
449 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded" />
450 <xs:choice>
451 <xs:element name="TABLE" type="Table" />
452 <xs:element name="RESOURCE" type="Resource" />
453 </xs:choice>
454 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
455 </xs:sequence>
456 <!-- Suggested Doug Tody, to include new RESOURCE types -->
457 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
458 </xs:sequence>
459 <xs:attribute name="name" type="xs:token" />
460 <xs:attribute name="ID" type="xs:ID" />
461 <xs:attribute name="utype" type="xs:string" />
462 <xs:attribute name="type" default="results">
463 <xs:simpleType>
464 <xs:restriction base="xs:NMTOKEN">
465 <xs:enumeration value="results" />
466 <xs:enumeration value="meta" />
467 </xs:restriction>
468 </xs:simpleType>
469 </xs:attribute>
470 <!-- Suggested Doug Tody, to include new RESOURCE attributes -->
471 <xs:anyAttribute namespace="##other" processContents="lax" />
472 </xs:complexType>
473
474
475 <!-- VODML types -->
476
477 <xs:complexType name="VODML">
478 <xs:sequence>
479 <xs:element name="TARGET" type="VODMLAnnotationTarget" minOccurs="0"/>
480 <xs:element name="MODEL" type="Model" minOccurs="0" maxOccurs="unbounded" />
481 <xs:element name="VODML_GLOBALS" type="VODMLGlobals" minOccurs="0" maxOccurs="unbounded"/>
482 <xs:element name="VODML_TEMPLATES" type="VODMLInstanceTemplates" minOccurs="0" maxOccurs="unbounded"/>
483 </xs:sequence>
484 </xs:complexType>
485
486 <xs:simpleType name="VODMLAnnotationTargetType">
487 <xs:restriction base="xs:string">
488 <xs:enumeration value="VOTable">
489 <xs:annotation>
490 <xs:documentation>
491 The data that is annotated resides in a VOTable elsewhere, indicated by a URL.
492 </xs:documentation>
493 </xs:annotation>
494 </xs:enumeration>
495 <xs:enumeration value="FITS">
496 <xs:annotation>
497 <xs:documentation>
498 The data that is annotated resides in a FITS file elsewhere, indicated by a URL.
499 </xs:documentation>
500 </xs:annotation>
501 </xs:enumeration>
502 <xs:enumeration value="TAP_SCHEMA">
503 <xs:annotation>
504 <xs:documentation>
505 The data that is annotated is accessible through the TAP service indicated by a URL end point.
506 </xs:documentation>
507 </xs:annotation>
508 </xs:enumeration>
509 </xs:restriction>
510 </xs:simpleType>
511
512 <xs:complexType name="VODMLAnnotationTarget">
513 <xs:sequence>
514 <xs:element name="TARGETTYPE" type="VODMLAnnotationTargetType"/>
515 <xs:element name="LOCATION" type="xs:anyURI"/>
516 </xs:sequence>
517 </xs:complexType>
518
519 <xs:complexType name="VODMLGlobals">
520 <xs:annotation>
521 <xs:documentation>
522 This section will describe all global instances, that is, instances that are not created once per row of a table.
523 It starts with a list of all the MODELs, then has all the GLOBAL instances.
524 </xs:documentation>
525 </xs:annotation>
526 <xs:sequence>
527 <xs:element name="VODMLOBJECT" type="VODMLObject" minOccurs="0" maxOccurs="unbounded" />
528 </xs:sequence>
529 <xs:attribute name="ID" type="xs:ID" use="optional"/>
530 </xs:complexType>
531
532 <xs:complexType name="VODMLInstanceTemplates">
533 <xs:annotation>
534 <xs:documentation>
535 This section will describe all the instance, that is, instances created once per row of a table.
536 The instances can have FIELDrefs describing how to fill individual primtive valuesthe templates from TABLEDATA values.
537 </xs:documentation>
538 </xs:annotation>
539 <xs:sequence>
540 <xs:element name="VODMLOBJECT" type="VODMLObject" minOccurs="0" maxOccurs="unbounded" />
541 </xs:sequence>
542 <xs:attribute name="tableref" type="xs:IDREF" use="optional"/>
543 <xs:attribute name="tablename" type="xs:string" use="optional">
544 <xs:annotation>
545 <xs:documentation>
546 For TAP_SCHEMA
547 </xs:documentation>
548 </xs:annotation>
549 </xs:attribute>
550 <xs:attribute name="tablerank" type="xs:int" use="optional">
551 <xs:annotation>
552 <xs:documentation>
553 For FITS files or VOTable TABLEs without ID.
554 </xs:documentation>
555 </xs:annotation>
556 </xs:attribute>
557 </xs:complexType>
558
559 <xs:complexType name="Model">
560 <xs:sequence>
561 <xs:element name="NAME" type="xs:string">
562 <!-- todo add regexp restriction -->
563 </xs:element>
564 <xs:element name="URL" type="xs:anyURI" />
565 <xs:element name="IDENTIFIER" type="xs:string" minOccurs="0" />
566 </xs:sequence>
567 <xs:attribute name="ID" type="xs:ID" />
568 </xs:complexType>
569
570 <xs:complexType name="VODMLInstance" abstract="true">
571 <xs:sequence>
572 <xs:element name="TYPE" type="VODMLRef" minOccurs="0" maxOccurs="1" />
573 </xs:sequence>
574 <xs:attribute name="ID" type="xs:ID">
575 <xs:annotation>
576 <xs:documentation>
577 Can be used by references as identifier for an object or template.
578 </xs:documentation>
579 </xs:annotation>
580 </xs:attribute>
581 </xs:complexType>
582
583 <xs:complexType name="VODMLObject">
584 <xs:complexContent>
585 <xs:extension base="VODMLInstance">
586 <xs:sequence>
587 <!-- lets be explicit -->
588 <xs:element name="IDENTIFIER" type="VODMLObjectIdentifier" minOccurs="0">
589 <xs:annotation>
590 <xs:documentation>
591 Objects, i.e. ObjectType instances, can have a unique identifier which can be used in ORM-like references.
592 </xs:documentation>
593 </xs:annotation>
594 </xs:element>
595 <xs:element name="CONTAINER" type="VODMLReference" minOccurs="0" maxOccurs="1" >
596 <xs:annotation>
597 <xs:documentation>
598 Possible reference to a parent container of the object. May be given when the objects is not already
599 contained in a colleciton on the parent object.
600 </xs:documentation>
601 </xs:annotation>
602 </xs:element>
603 <xs:element name="ATTRIBUTE" type="VODMLAttribute" minOccurs="0" maxOccurs="unbounded" />
604 <xs:element name="COLLECTION" type="VODMLCollection" minOccurs="0" maxOccurs="unbounded" />
605 <xs:element name="REFERENCE" type="VODMLReference" minOccurs="0" maxOccurs="unbounded" />
606 </xs:sequence>
607 </xs:extension>
608 </xs:complexContent>
609 </xs:complexType>
610
611 <xs:complexType name="VODMLPrimitive"> <!-- in place of PARAM -->
612 <xs:complexContent>
613 <xs:extension base="VODMLInstance">
614 <xs:sequence>
615 <xs:element name="OPTIONMAPPING" type="VODMLOptionMapping" minOccurs="0" maxOccurs="unbounded">
616 <xs:annotation>
617 <xs:documentation>
618 Allows one to map OPTION values in VOTABLE to either EnumLiterals in data model (if TYPE identifies VO-DML/ Enumeration),
619 or SKOSConcept in external SKOS vocabulary (if ROLE is a VO-DML/Attribute containing a skosconcept declaration).
620 NB: IF the datatype of the ROLE is an Enumeration, and there is NO optionmapping it implies that the values ARE the enum literals, or the concepts.
621 </xs:documentation>
622 </xs:annotation>
623 </xs:element>
624 </xs:sequence>
625 </xs:extension>
626 </xs:complexContent>
627 </xs:complexType>
628
629
630 <xs:complexType name="VODMLLiteral"> <!-- in place of PARAM -->
631 <xs:complexContent>
632 <xs:extension base="VODMLPrimitive">
633 <xs:attribute name="datatype" type="dataType" />
634 <xs:attribute name="unit" type="xs:string" />
635 <xs:attribute name="arraysize" type="arrayDEF" />
636 <xs:attribute name="value" type="xs:string"/>
637 </xs:extension>
638 </xs:complexContent>
639 </xs:complexType>
640
641 <xs:complexType name="VODMLOptionMapping">
642 <xs:annotation>
643 <xs:documentation>
644 Allows one to map particular values defined in a VALUES/OPTION list to enumeration literals
645 in the VO-DML model or to a concept in a SKOS vocabulary.
646 </xs:documentation>
647 </xs:annotation>
648 <xs:sequence>
649 <xs:element name="OPTION" type="xs:string" minOccurs="1" maxOccurs="1" >
650 <xs:annotation>
651 <xs:documentation>
652 The VOTable OPTION value that is being maped to enum literal or semantic concept.
653 </xs:documentation>
654 </xs:annotation>
655 </xs:element>
656 <xs:choice>
657 <xs:element name="LITERAL" type="VODMLReference" minOccurs="1" maxOccurs="1" />
658 <xs:element name="SEMANTICCONCEPT" type="xs:string" minOccurs="1" maxOccurs="1" >
659 <xs:annotation>
660 <xs:documentation>
661 TBD anyURI as an identifier of concepts made sense for SKOS vocabularies. How about general semantic vocabularies?
662 I.e. is it ok for the type be xs:string iso xs:anyURI?
663 </xs:documentation>
664 </xs:annotation>
665 </xs:element>
666 </xs:choice>
667 </xs:sequence>
668 </xs:complexType>
669 <xs:complexType name="VODMLFieldRef">
670 <xs:complexContent>
671 <xs:extension base="VODMLPrimitive">
672 <xs:attribute name="fieldref" type="xs:IDREF" use="required" />
673 </xs:extension>
674 </xs:complexContent>
675 </xs:complexType>
676
677 <xs:complexType name="VODMLRole">
678 <xs:sequence>
679 <xs:element name="ROLE" type="VODMLRef" minOccurs="0" maxOccurs="1">
680 <xs:annotation>
681 <xs:documentation>
682 NB: ROLE has minOccurs=0 , at the moment only because VODMLObject::CONTAINER (a VODMLReferece) needs no role.
683 ATTRIBUTE, COLLECTION and REFERENCE MUST have a ROLE.
684 Hard to model in XML schema, could be done in Schematron.
685 </xs:documentation>
686 </xs:annotation>
687 </xs:element>
688 </xs:sequence>
689 </xs:complexType>
690
691 <xs:complexType name="VODMLAttribute">
692 <xs:complexContent>
693 <xs:extension base="VODMLRole">
694 <xs:sequence>
695 <xs:choice>
696 <xs:element name="FIELDREF" type="VODMLFieldRef" >
697 <xs:annotation>
698 <xs:documentation>
699 When used inside a "template" structured type, i.e. one defined inside a TABLE element,
700 this allows one to indicate a FIELD representing the attribute.
701 </xs:documentation>
702 </xs:annotation>
703 </xs:element>
704 <xs:element name="LITERAL" type="VODMLLiteral">
705 <xs:annotation>
706 <xs:documentation>
707 Simple, primitive value, possibly with extra attributes.
708 Similar to PARAM, but restricted attribute set.
709 </xs:documentation>
710 </xs:annotation>
711 </xs:element>
712 <xs:element name="VODMLOBJECT" type="VODMLObject">
713 <xs:annotation>
714 <xs:documentation>
715 SVALUE == structured value, instance of DataType
716 </xs:documentation>
717 </xs:annotation>
718 </xs:element>
719 </xs:choice>
720 </xs:sequence>
721 </xs:extension>
722 </xs:complexContent>
723 </xs:complexType>
724
725 <xs:complexType name="VODMLCollection">
726 <xs:annotation>
727 <xs:documentation>
728 A VODMLCollection represents collection of child objects in a VO-DML Composition relationship.
729 The collection receives the VO-DML ref to the composition relation, the member objects inside the
730 collection do *not* have a ROLE.
731 </xs:documentation>
732 </xs:annotation>
733 <xs:complexContent>
734 <xs:extension base="VODMLRole">
735 <xs:sequence>
736 <xs:element name="VODMLOBJECT" type="VODMLObject" maxOccurs="unbounded" minOccurs="0">
737 <xs:annotation>
738 <xs:documentation>
739 An object in the collection. It type must conform to the declared type of the VO-DML Collection.
740 I.e. it must be that exact type or a sub-type.
741 </xs:documentation>
742 </xs:annotation>
743 </xs:element>
744 </xs:sequence>
745 </xs:extension>
746 </xs:complexContent>
747 </xs:complexType>
748
749 <xs:complexType name="VODMLReference">
750 <xs:annotation>
751 <xs:documentation>
752 Provides a reference to an ObjectType instance. Must allow that instance to be identified exactly.
753 VArious different modes depending on how that instance is serialized.
754 - If as a Standalone instance in same VOTable document, an IDREF can point to its ID (use IDREF).
755 - If as a row in a TABLE a relational foreign key can be used (use ORMREFERENCE)
756 - if a remote document contains the serialized instance, a URI must be used that MUST be able to identify that object
757 inside its remote serialization (a REMOTEREFERENCE must be used).
758 </xs:documentation>
759 </xs:annotation>
760 <xs:complexContent>
761 <xs:extension base="VODMLRole">
762 <xs:sequence>
763 <xs:choice>
764 <xs:element name="IDREF" type="xs:IDREF">
765 <xs:annotation>
766 <xs:documentation>
767 MUST identify an individual/standalone object defined in the same XML document.
768 </xs:documentation>
769 </xs:annotation>
770 </xs:element>
771 <xs:element name="REMOTEREFERENCE" type="xs:anyURI" />
772 <xs:element name="ORMREFERENCE" type="VODMLORMReference" />
773 </xs:choice>
774 </xs:sequence>
775 </xs:extension>
776 </xs:complexContent>
777 </xs:complexType>
778
779 <xs:complexType name="VODMLORMReference">
780 <xs:annotation>
781 <xs:documentation>
782 A reference to an object identified by that object's identifier.
783 The referenced object must be stored in a TABLE and must have been annotated with an explicit identifier.
784 </xs:documentation>
785 </xs:annotation>
786 <xs:sequence>
787 <xs:element name="FK" type="VODMLObjectIdentifier">
788 <xs:annotation>
789 <xs:documentation>
790 Foreign key, identifying the referenced object. That object must be stored in a TABLE and
791 must have been annotated with an identifier of the same shape as the FK.
792 </xs:documentation>
793 </xs:annotation>
794 </xs:element>
795 <xs:element name="CONTAINERID" type="xs:IDREF" minOccurs="0">
796 <xs:annotation>
797 <xs:documentation>
798 This element MAY be used to provide a IDREF to the (ID of the) VODMLObject template annotating
799 the TABLE containing the referenced object.
800 </xs:documentation>
801 </xs:annotation>
802 </xs:element>
803 </xs:sequence>
804 </xs:complexType>
805
806 <xs:complexType name="VODMLObjectIdentifierField">
807 <xs:choice>
808 <xs:element name="LITERAL" type="VODMLLiteral"/>
809 <xs:element name="FIELDREF" type="VODMLFieldRef"/>
810 </xs:choice>
811 </xs:complexType>
812
813 <xs:complexType name="VODMLObjectIdentifier">
814 <xs:annotation>
815 <xs:documentation>
816 This type allows a generic identifier to be assigned to an object. The identifier consists of one or more IDFIELD-s.
817 This way of identifying an object is equivalent to using one or more columns in a table as primary key.
818 </xs:documentation>
819 </xs:annotation>
820 <xs:sequence>
821 <xs:element name="IDFIELD" maxOccurs="unbounded" type="VODMLObjectIdentifierField">
822 <xs:annotation>
823 <xs:documentation>
824 A field in an identifier. The identifier may contain 1 or more such fields. Their order
825 is important, ORM references to the object must use the same order for their foreign key.
826 </xs:documentation>
827 </xs:annotation>
828 </xs:element>
829 </xs:sequence>
830 </xs:complexType>
831
832 <xs:simpleType name="VODMLRef">
833 <xs:annotation>
834 <xs:documentation>
835 The valid format of a reference to a VO-DML element. (Used to be 'UTYPE').
836 MUST have a prefix that elsewhere in the VOTable is defined to correspond to a VO-DML model defining the referenced
837 element.
838 See "mapping document", https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/doc/MappingDMtoVOTable-v1.0-201607xx.docx.
839 Suffix, separated from the prefix by a ':', MUST correspond to the vodml-id of the referenced element in the
840 VO-DML/XML representation
841 of that model.
842 </xs:documentation>
843 </xs:annotation>
844 <xs:restriction base="xs:string">
845 <!-- need to do something about pattern, iso \w use a-zA-Z0-9 -->
846 <xs:pattern value="[\w_\-]+:[\w_\-/\./*]+" />
847 </xs:restriction>
848 </xs:simpleType>
849 <!-- VOTable is the root element -->
850 <xs:element name="VOTABLE">
851 <xs:complexType>
852 <xs:sequence>
853 <xs:element name="VODML_ANNOTATION" type="VODML" minOccurs="0" />
854 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
855 <xs:element name="DEFINITIONS" type="Definitions" minOccurs="0" />
856 <!-- Deprecated -->
857 <xs:choice minOccurs="0" maxOccurs="unbounded">
858 <xs:element name="COOSYS" type="CoordinateSystem" />
859 <!-- Deprecated in V1.2 -->
860 <xs:element name="GROUP" type="Group" />
861 <xs:element name="PARAM" type="Param" />
862 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
863 </xs:choice>
864 <xs:element name="RESOURCE" type="Resource" minOccurs="1" maxOccurs="unbounded" />
865 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
866 </xs:sequence>
867 <xs:attribute name="ID" type="xs:ID" />
868 <xs:attribute name="version">
869 <xs:simpleType>
870 <xs:restriction base="xs:NMTOKEN">
871 <xs:enumeration value="1.3" />
872 </xs:restriction>
873 </xs:simpleType>
874 </xs:attribute>
875 </xs:complexType>
876 </xs:element>
877
878
879
880
881 <!-- ONe MAY only have a VODML nnotation, in that case the target type MUST be provided -->
882 <xs:element name="VODML_ANNOTATION" type="VODML"/>
883
884
885
886 </xs:schema>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26