-
Notifications
You must be signed in to change notification settings - Fork 1
/
vo-dml-instance.xsd
182 lines (162 loc) · 7.26 KB
/
vo-dml-instance.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://volute.g-vo.org/dm/vo-dml-instance/v0.x"
targetNamespace="http://volute.g-vo.org/dm/vo-dml-instance/v0.x"
attributeFormDefault="unqualified"
elementFormDefault="unqualified">
<xsd:annotation>
<xsd:documentation>
This schema defines a standard serialisation format for the VO-DML meta-model.
It allows one to create instance documents for models defined via a VO-DML document.
It does so in a way that is the same for each model, i.e. does NOT create new types for different models.
This is in contrast to for example the instance documents that would arise from a mapping to XML schema for example.
This is NOT intended to provide a standard serialisation format for these models, but to provide a standard
target for translational semantics. IF a VOTable for example can be translated to such a document,
it has been annotated correctly.
</xsd:documentation>
</xsd:annotation>
<!-- +++++++++++++++++++ Begin of 'VODMLREF section' +++++++++++++++++++ -->
<xsd:simpleType name="VODMLREF">
<xsd:annotation>
<xsd:documentation>
This simpleType allows concatenation of vo-dml:VODMLREF-s.
TBD define the pattern, is the one below correct?
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:pattern value="([a-zA-Z0-9/:._])+(['+']{1}([a-zA-Z0-9/:.])+)*"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Instance">
<xsd:sequence>
<xsd:element name="model" type="ModelLocation" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element name="object" type="Object" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="dataObject" type="DataObject" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ModelLocation">
<xsd:annotation>
<xsd:documentation>
This class describes the location of a data model's VO-DML and HTML documents.
Note, these should eventually be derived form an appropriate Registry entry.
Can also give include the prefix to be used in a particular instantiation document.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="vodmlURL" type="xsd:anyURI"/>
<xsd:element name="documentationURL" type="xsd:anyURI" minOccurs="0"/>
<xsd:element name="vodmlrefPrefix" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Object">
<xsd:sequence>
<xsd:element name="identifier" type="ObjectId" minOccurs="0"/>
<xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="container" type="Reference" minOccurs="0" maxOccurs="1"/>
<xsd:element name="collection" type="Collection" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="vodmlRef" type="VODMLREF"/>
</xsd:complexType>
<xsd:complexType name="ObjectId">
<xsd:annotation>
<xsd:documentation>
Wrapper type for an Object Identifier.
Consists of a transientID, which is a long and acts as a key (see below).
It also contains a publisherDID, and an externalID, which is a URL, possibly pointing into a registry.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="transientID" type="xsd:string" minOccurs="1"/>
<xsd:element name="publisherDID" type="CustomId" minOccurs="0"/>
<xsd:element name="altID" type="AltId" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomId">
<xsd:annotation>
<xsd:documentation>
Wrapper type for a custom identifier, modelled simply as a collection of fields of string type.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="field" type="xsd:string" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AltId">
<xsd:complexContent>
<xsd:extension base="CustomId">
<xsd:sequence>
<xsd:element name="source" type="xsd:string" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Attribute" >
<xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:element name="primitiveValue" type="PrimitiveValue"/>
<xsd:element name="dataObject" type="DataObject"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="vodmlRef" type="VODMLREF" use="required"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="type" type="VODMLREF" use="optional"/>
</xsd:complexType>
<xsd:complexType name="DataObject">
<xsd:sequence>
<xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="vodmlRef" type="VODMLREF" use="required"/>
</xsd:complexType>
<xsd:complexType name="PrimitiveValue" mixed="true">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="vodmlRef" type="VODMLREF"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Collection">
<xsd:sequence>
<xsd:element name="object" type="Object" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Objects contained in a parent container are always serialized inside the container.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="vomdmlRef" type="VODMLREF" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="Reference">
<xsd:sequence>
<xsd:element name="object-doc" type="xsd:anyURI" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Instance document containing the referenced object.
If not specified the current document is intended.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="ObjectId" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
The id of the referenced object in the document indicated by object-doc.
I.e. in this serialization format referenced objects are NEVER contained within the referrer.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="vodmlRef" type="VODMLREF" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="optional"/>
<xsd:attribute name="type" type="VODMLREF" use="required"/>
</xsd:complexType>
<xsd:element name="instance" type="Instance">
<xsd:unique name="unique-ids">
<xsd:selector xpath=".//object/id"/>
<xsd:field xpath="uri-id"/>
</xsd:unique>
</xsd:element>
</xsd:schema>