/[volute]/trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.4_vodml.xsd
ViewVC logotype

Contents of /trunk/projects/dm/vo-dml/xsd/ext/VOTable-1.4_vodml.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3867 - (show annotations)
Thu Feb 9 14:27:47 2017 UTC (4 years, 5 months ago) by gerard.lemson
File size: 36258 byte(s)
updated regexp for modelname in vodml.xsd and vodmlref in votable-alt.
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="DESCRIPTION" type="anyTEXT" minOccurs="0" />
405 <!-- GL: why a choice iso for example -->
406 <!-- <xs:element name="PARAM" type="Param" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="FIELD" type="Field"
407 minOccurs="0" maxOccurs="unbounded"/> <xs:element name="GROUP" type="Group" minOccurs="0" maxOccurs="unbounded"/> -->
408 <!-- This could also enforce groups to be defined after the fields and params to which they must have a reference, which
409 is somewhat more logical -->
410 <!-- Added Version 1.2: -->
411 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
412 <!-- An empty table without any FIELD/PARAM should not be acceptable -->
413 <xs:choice minOccurs="1" maxOccurs="unbounded">
414 <xs:element name="FIELD" type="Field" />
415 <xs:element name="PARAM" type="Param" />
416 <xs:element name="GROUP" type="Group" />
417 </xs:choice>
418 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded" />
419 <!-- This would allow several DATA parts in a table (future extension?) <xs:sequence minOccurs="0" maxOccurs="unbounded">
420 <xs:element name="DATA" type="Data"/> <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> -->
421 <xs:element name="DATA" type="Data" minOccurs="0" />
422 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
423 </xs:sequence>
424 <xs:attribute name="ID" type="xs:ID" />
425 <xs:attribute name="name" type="xs:token" />
426 <xs:attribute name="ref" type="xs:IDREF" />
427 <xs:attribute name="ucd" type="ucdType" />
428 <xs:attribute name="utype" type="xs:string" />
429 <xs:attribute name="nrows" type="xs:nonNegativeInteger" />
430 </xs:complexType>
431 <!-- RESOURCES can contain DESCRIPTION, (INFO|PARAM|COSYS), LINK, TABLEs -->
432 <xs:complexType name="Resource">
433 <xs:annotation>
434 <xs:documentation>
435 Added in Version 1.2: INFO for diagnostics in several places
436 </xs:documentation>
437 </xs:annotation>
438 <xs:sequence>
439 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
440 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
441 <xs:choice minOccurs="0" maxOccurs="unbounded">
442 <xs:element name="COOSYS" type="CoordinateSystem" />
443 <!-- Deprecated in V1.2 -->
444 <xs:element name="GROUP" type="Group" />
445 <xs:element name="PARAM" type="Param" />
446 </xs:choice>
447 <xs:sequence minOccurs="0" maxOccurs="unbounded">
448 <xs:element name="LINK" type="Link" minOccurs="0" maxOccurs="unbounded" />
449 <xs:choice>
450 <xs:element name="TABLE" type="Table" />
451 <xs:element name="RESOURCE" type="Resource" />
452 </xs:choice>
453 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
454 </xs:sequence>
455 <!-- Suggested Doug Tody, to include new RESOURCE types -->
456 <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
457 </xs:sequence>
458 <xs:attribute name="name" type="xs:token" />
459 <xs:attribute name="ID" type="xs:ID" />
460 <xs:attribute name="utype" type="xs:string" />
461 <xs:attribute name="type" default="results">
462 <xs:simpleType>
463 <xs:restriction base="xs:NMTOKEN">
464 <xs:enumeration value="results" />
465 <xs:enumeration value="meta" />
466 </xs:restriction>
467 </xs:simpleType>
468 </xs:attribute>
469 <!-- Suggested Doug Tody, to include new RESOURCE attributes -->
470 <xs:anyAttribute namespace="##other" processContents="lax" />
471 </xs:complexType>
472
473
474 <!-- VODML types -->
475
476 <xs:complexType name="VODML">
477 <xs:sequence>
478 <xs:element name="MODEL" type="Model" minOccurs="1" maxOccurs="unbounded" />
479 <xs:element name="GLOBALS" type="VODMLGlobals" minOccurs="0" maxOccurs="unbounded"/>
480 <xs:element name="TEMPLATES" type="VODMLInstanceTemplates" minOccurs="0" maxOccurs="unbounded"/>
481 </xs:sequence>
482 </xs:complexType>
483
484 <xs:complexType name="VODMLGlobals">
485 <xs:annotation>
486 <xs:documentation>
487 This section will describe all global instances, that is, instances that are not created once per row of a table.
488 It starts with a list of all the MODELs, then has all the GLOBAL instances.
489 </xs:documentation>
490 </xs:annotation>
491 <xs:sequence>
492 <xs:element name="INSTANCE" type="VODMLObject" minOccurs="0" maxOccurs="unbounded" />
493 </xs:sequence>
494 <xs:attribute name="ID" type="xs:ID" use="optional"/>
495 </xs:complexType>
496
497 <xs:complexType name="VODMLInstanceTemplates">
498 <xs:annotation>
499 <xs:documentation>
500 This section will describe all the instance, that is, instances created once per row of a table.
501 The instances can have FIELDrefs describing how to fill individual primtive valuesthe templates from TABLEDATA values.
502 </xs:documentation>
503 </xs:annotation>
504 <xs:sequence>
505 <xs:element name="INSTANCE" type="VODMLObject" minOccurs="0" maxOccurs="unbounded" />
506 </xs:sequence>
507 <xs:attribute name="tableref" type="xs:IDREF" use="required"/>
508 </xs:complexType>
509
510 <xs:complexType name="Model">
511 <xs:sequence>
512 <xs:element name="NAME" type="xs:string">
513 <!-- todo add regexp restriction -->
514 </xs:element>
515 <xs:element name="URL" type="xs:anyURI" />
516 <xs:element name="IDENTIFIER" type="xs:string" minOccurs="0" />
517 </xs:sequence>
518 <xs:attribute name="ID" type="xs:ID" />
519 </xs:complexType>
520
521 <xs:complexType name="VODMLInstance" abstract="true">
522 <xs:attribute name="dmtype" type="VODMLRef" use="required" />
523 <xs:attribute name="ID" type="xs:ID">
524 <xs:annotation>
525 <xs:documentation>
526 Can be used by references as identifier for an object or template.
527 </xs:documentation>
528 </xs:annotation>
529 </xs:attribute>
530 </xs:complexType>
531
532 <xs:complexType name="VODMLObject">
533 <xs:complexContent>
534 <xs:extension base="VODMLInstance">
535 <xs:sequence>
536 <!-- lets be explicit -->
537 <xs:element name="IDENTIFIER" type="VODMLObjectIdentifier" minOccurs="0">
538 <xs:annotation>
539 <xs:documentation>
540 Objects, i.e. ObjectType instances, can have a unique identifier which can be used in ORM-like references.
541 </xs:documentation>
542 </xs:annotation>
543 </xs:element>
544 <xs:element name="CONTAINER" type="VODMLReference" minOccurs="0" maxOccurs="1" >
545 <xs:annotation>
546 <xs:documentation>
547 Possible reference to a parent container of the object. May be given when the objects is not already
548 contained in a colleciton on the parent object.
549 </xs:documentation>
550 </xs:annotation>
551 </xs:element>
552 <xs:element name="ATTRIBUTE" type="VODMLAttribute" minOccurs="0" maxOccurs="unbounded" />
553 <xs:element name="COMPOSITION" type="VODMLComposition" minOccurs="0" maxOccurs="unbounded" />
554 <xs:element name="REFERENCE" type="VODMLReference" minOccurs="0" maxOccurs="unbounded" />
555 </xs:sequence>
556 </xs:extension>
557 </xs:complexContent>
558 </xs:complexType>
559
560 <xs:complexType name="VODMLPrimitive"> <!-- in place of PARAM -->
561 <xs:complexContent>
562 <xs:extension base="VODMLInstance">
563 <xs:sequence>
564 <xs:element name="OPTIONMAPPING" type="VODMLOptionMapping" minOccurs="0" maxOccurs="unbounded">
565 <xs:annotation>
566 <xs:documentation>
567 Allows one to map OPTION values in VOTABLE to either EnumLiterals in data model (if TYPE identifies VO-DML/ Enumeration),
568 or SKOSConcept in external SKOS vocabulary (if ROLE is a VO-DML/Attribute containing a skosconcept declaration).
569 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.
570 </xs:documentation>
571 </xs:annotation>
572 </xs:element>
573 </xs:sequence>
574 </xs:extension>
575 </xs:complexContent>
576 </xs:complexType>
577
578
579 <xs:complexType name="VODMLLiteral"> <!-- in place of PARAM -->
580 <xs:complexContent>
581 <xs:extension base="VODMLPrimitive">
582 <xs:attribute name="datatype" type="dataType" />
583 <xs:attribute name="unit" type="xs:string" />
584 <xs:attribute name="arraysize" type="arrayDEF" />
585 <xs:attribute name="value" type="xs:string"/>
586 </xs:extension>
587 </xs:complexContent>
588 </xs:complexType>
589
590
591 <xs:complexType name="VODMLOptionMapping">
592 <xs:annotation>
593 <xs:documentation>
594 Allows one to map particular values defined in a VALUES/OPTION list to enumeration literals
595 in the VO-DML model or to a concept in a SKOS vocabulary.
596 </xs:documentation>
597 </xs:annotation>
598 <xs:sequence>
599 <xs:element name="OPTION" type="xs:string" minOccurs="1" maxOccurs="1" >
600 <xs:annotation>
601 <xs:documentation>
602 The VOTable OPTION value that is being maped to enum literal or semantic concept.
603 </xs:documentation>
604 </xs:annotation>
605 </xs:element>
606 <xs:choice>
607 <xs:element name="ENUMLITERAL" type="VODMLRef" minOccurs="1" maxOccurs="1" />
608 <xs:element name="SEMANTICCONCEPT" type="xs:anyURI" minOccurs="1" maxOccurs="1" >
609 <xs:annotation>
610 <xs:documentation>
611 TBD anyURI as an identifier of concepts made sense for SKOS vocabularies. How about general semantic vocabularies?
612 I.e. is it ok for the type be xs:string iso xs:anyURI?
613 </xs:documentation>
614 </xs:annotation>
615 </xs:element>
616 </xs:choice>
617 </xs:sequence>
618 </xs:complexType>
619
620 <xs:complexType name="VODMLFieldOrParamRef">
621 <xs:complexContent>
622 <xs:extension base="VODMLPrimitive">
623 <xs:attribute name="ref" type="xs:IDREF" use="required" />
624 </xs:extension>
625 </xs:complexContent>
626 </xs:complexType>
627
628
629 <xs:complexType name="VODMLRole">
630 <xs:attribute name="dmrole" type="VODMLRef" use="optional">
631 <xs:annotation>
632 <xs:documentation>
633 NB: ROLE has minOccurs=0 , at the moment only because VODMLObject::CONTAINER (a VODMLReferece) needs no role.
634 ATTRIBUTE, COMPOSITION and REFERENCE MUST have a ROLE.
635 Hard to model in XML schema, could be done in Schematron.
636 </xs:documentation>
637 </xs:annotation>
638 </xs:attribute>
639 </xs:complexType>
640
641 <xs:complexType name="VODMLAttribute">
642 <xs:complexContent>
643 <xs:extension base="VODMLRole">
644 <xs:sequence>
645 <xs:choice>
646 <xs:choice maxOccurs="unbounded">
647 <xs:element name="COLUMN" type="VODMLFieldOrParamRef">
648 <xs:annotation>
649 <xs:documentation>
650 When used inside a "template" structured type, i.e. one defined inside a TABLE element,
651 this allows one to indicate a FIELD representing the attribute.
652 </xs:documentation>
653 </xs:annotation>
654 </xs:element>
655 <xs:element name="CONSTANT" type="VODMLFieldOrParamRef">
656 <xs:annotation>
657 <xs:documentation>
658 Ref to a predefined PARAM.
659 </xs:documentation>
660 </xs:annotation>
661 </xs:element>
662 <xs:element name="LITERAL" type="VODMLLiteral">
663 <xs:annotation>
664 <xs:documentation>
665 Simple, primitive value, possibly with extra attributes.
666 Similar to PARAM, but restricted attribute set.
667 </xs:documentation>
668 </xs:annotation>
669 </xs:element>
670 </xs:choice>
671 <xs:element name="INSTANCE" type="VODMLObject" maxOccurs="unbounded">
672 <xs:annotation>
673 <xs:documentation>
674 SVALUE == structured value, instance of DataType
675 </xs:documentation>
676 </xs:annotation>
677 </xs:element>
678 </xs:choice>
679 </xs:sequence>
680 </xs:extension>
681 </xs:complexContent>
682 </xs:complexType>
683
684 <xs:complexType name="VODMLComposition">
685 <xs:annotation>
686 <xs:documentation>
687 A VODMLCollection represents collection of child objects in a VO-DML Composition relationship.
688 The collection receives the VO-DML ref to the composition relation, the member objects inside the
689 collection do *not* have a ROLE.
690 </xs:documentation>
691 </xs:annotation>
692 <xs:complexContent>
693 <xs:extension base="VODMLRole">
694 <xs:sequence>
695 <xs:element name="INSTANCE" type="VODMLObject" maxOccurs="unbounded" minOccurs="0">
696 <xs:annotation>
697 <xs:documentation>
698 An object in the collection. It type must conform to the declared type of the VO-DML Collection.
699 I.e. it must be that exact type or a sub-type.
700 </xs:documentation>
701 </xs:annotation>
702 </xs:element>
703 <xs:element name="EXTINSTANCES" type="xs:IDREF" maxOccurs="unbounded" minOccurs="0">
704 <xs:annotation>
705 <xs:documentation>
706 Reference to a VODMLOBJECT declaration possibly containing child objects for this composition relation.
707 </xs:documentation>
708 </xs:annotation>
709 </xs:element>
710 </xs:sequence>
711 </xs:extension>
712 </xs:complexContent>
713 </xs:complexType>
714
715
716
717
718 <xs:complexType name="VODMLReference">
719 <xs:annotation>
720 <xs:documentation>
721 Provides a reference to an ObjectType instance. Must allow that instance to be identified exactly.
722 VArious different modes depending on how that instance is serialized.
723 - If as a Standalone instance in same VOTable document, an IDREF can point to its ID (use IDREF).
724 - If as a row in a TABLE a relational foreign key can be used (use ORMREFERENCE)
725 - if a remote document contains the serialized instance, a URI must be used that MUST be able to identify that object
726 inside its remote serialization (a REMOTEREFERENCE must be used).
727 </xs:documentation>
728 </xs:annotation>
729 <xs:complexContent>
730 <xs:extension base="VODMLRole">
731 <xs:sequence>
732 <xs:choice>
733 <xs:element name="IDREF" type="xs:IDREF">
734 <xs:annotation>
735 <xs:documentation>
736 MUST identify an individual/standalone object defined in the same XML document.
737 </xs:documentation>
738 </xs:annotation>
739 </xs:element>
740 <xs:element name="REMOTEREFERENCE" type="xs:anyURI" />
741 <xs:element name="FOREIGNKEY" type="VODMLORMReference" />
742 </xs:choice>
743 </xs:sequence>
744 </xs:extension>
745 </xs:complexContent>
746 </xs:complexType>
747
748 <xs:complexType name="VODMLORMReference">
749 <xs:annotation>
750 <xs:documentation>
751 A reference to an object identified by that object's identifier.
752 The referenced object must be stored in a TABLE and must have been annotated with an explicit identifier.
753 </xs:documentation>
754 </xs:annotation>
755 <xs:complexContent>
756 <xs:extension base="VODMLObjectIdentifier">
757 <xs:sequence>
758 <xs:element name="TARGETID" type="xs:IDREF" minOccurs="0">
759 <xs:annotation>
760 <xs:documentation>
761 This element MAY be used to provide a IDREF to the (ID of a) VODMLObject template annotating
762 the TABLE containing the referenced object.
763 </xs:documentation>
764 </xs:annotation>
765 </xs:element>
766 </xs:sequence>
767 </xs:extension>
768 </xs:complexContent>
769 </xs:complexType>
770
771 <xs:complexType name="VODMLObjectIdentifierField">
772 <xs:choice>
773 <xs:element name="LITERAL" type="VODMLLiteral"/>
774 <xs:element name="COLUMN" type="VODMLFieldOrParamRef"/>
775 <xs:element name="CONSTANT" type="VODMLFieldOrParamRef"/>
776 </xs:choice>
777 </xs:complexType>
778
779 <xs:complexType name="VODMLObjectIdentifier">
780 <xs:annotation>
781 <xs:documentation>
782 This type allows a generic identifier to be assigned to an object. The identifier consists of one or more IDFIELD-s.
783 This way of identifying an object is equivalent to using one or more columns in a table as primary key.
784 </xs:documentation>
785 </xs:annotation>
786 <xs:sequence>
787 <xs:element name="IDFIELD" maxOccurs="unbounded" type="VODMLObjectIdentifierField">
788 <xs:annotation>
789 <xs:documentation>
790 A field in an identifier. The identifier may contain 1 or more such fields. Their order
791 is important, ORM references to the object must use the same order for their foreign key.
792 </xs:documentation>
793 </xs:annotation>
794 </xs:element>
795 </xs:sequence>
796 </xs:complexType>
797
798 <xs:simpleType name="VODMLRef">
799 <xs:annotation>
800 <xs:documentation>
801 The valid format of a reference to a VO-DML element. (Used to be 'UTYPE').
802 MUST have a prefix that elsewhere in the VOTable is defined to correspond to a VO-DML model defining the referenced
803 element.
804 See "mapping document", https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/doc/MappingDMtoVOTable-v1.0-201607xx.docx.
805 Suffix, separated from the prefix by a ':', MUST correspond to the vodml-id of the referenced element in the
806 VO-DML/XML representation
807 of that model.
808 </xs:documentation>
809 </xs:annotation>
810 <xs:restriction base="xs:string">
811 <xs:pattern value="[a-zA-Z][a-zA-Z0-9_\-]*:[a-zA-Z][a-zA-Z0-9\._]*" />
812 </xs:restriction>
813 </xs:simpleType>
814 <!-- VOTable is the root element -->
815 <xs:element name="VOTABLE">
816 <xs:complexType>
817 <xs:sequence>
818 <xs:element name="VODML" type="VODML" minOccurs="0" />
819 <xs:element name="DESCRIPTION" type="anyTEXT" minOccurs="0" />
820 <xs:element name="DEFINITIONS" type="Definitions" minOccurs="0" />
821 <!-- Deprecated -->
822 <xs:choice minOccurs="0" maxOccurs="unbounded">
823 <xs:element name="COOSYS" type="CoordinateSystem" />
824 <!-- Deprecated in V1.2 -->
825 <xs:element name="GROUP" type="Group" />
826 <xs:element name="PARAM" type="Param" />
827 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
828 </xs:choice>
829 <xs:element name="RESOURCE" type="Resource" minOccurs="1" maxOccurs="unbounded" />
830 <xs:element name="INFO" type="Info" minOccurs="0" maxOccurs="unbounded" />
831 </xs:sequence>
832 <xs:attribute name="ID" type="xs:ID" />
833 <xs:attribute name="version">
834 <xs:simpleType>
835 <xs:restriction base="xs:NMTOKEN">
836 <xs:enumeration value="1.3" />
837 </xs:restriction>
838 </xs:simpleType>
839 </xs:attribute>
840 </xs:complexType>
841 </xs:element>
842
843
844
845
846 <!-- ONe MAY only have a VODML nnotation, in that case the target type MUST be provided -->
847 <xs:element name="VODML_ANNOTATION" type="VODML"/>
848
849
850
851 </xs:schema>

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