XtensibleInterfaceDefinition.xsd
20.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2016, 2017, TeleCommunication Systems, Inc.,
a wholly-owned subsidiary of Comtech Telecommunications Corp.
and/or affiliates of TeleCommunication Systems, Inc.
All rights reserved.
TeleCommunication Systems, Inc. PROPRIETARY/CONFIDENTIAL.
Use is subject to license terms included in the distribution.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
xmlns="http://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
elementFormDefault="qualified">
<xs:annotation>
<xs:documentation xml:lang="en">
XtensibleInterfaceDefinition XML Schema Definition.
</xs:documentation>
</xs:annotation>
<xs:element name="specification" type="Specification"/>
<xs:complexType name="Specification">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="title" type="xs:normalizedString"/>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element maxOccurs="unbounded" minOccurs="0" name="comment" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="artifact" type="xs:anyURI"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="tag" type="Tag"/>
</xs:choice>
<xs:element maxOccurs="unbounded" minOccurs="0" name="import" type="Import"/>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="using" maxOccurs="unbounded" minOccurs="0" type="Using"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="namespace" type="Namespace"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="identity" use="required" type="NSName">
<xs:annotation>
<xs:documentation xml:lang="en">
Unique name for this spec (e.g. com.company.spec-name)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Element">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element maxOccurs="unbounded" minOccurs="0" name="comment" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="artifact" type="xs:anyURI"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="tag" type="Tag"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Import">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="ref" use="required" type="xs:anyURI" />
<xs:attribute name="local" use="optional" type="xs:normalizedString" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="NSName">
<xs:restriction base="xs:token">
<xs:pattern value="([a-zA-Z][a-zA-Z0-9_]*.)*[a-zA-Z][a-zA-Z0-9_]*">
<xs:annotation>
<xs:documentation xml:lang="en">
Fully qualified name (e.g. "SomeNamespace.SomeName" ) or base name (e.g. "SomeName").
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PName">
<xs:restriction base="NSName">
<xs:pattern value="[a-zA-Z][a-zA-Z0-9_]*">
<xs:annotation>
<xs:documentation xml:lang="en">
base name (e.g. "SomeName").
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DeclarationBase">
<xs:complexContent>
<xs:extension base="Element">
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="using" maxOccurs="unbounded" minOccurs="0" type="Using"/>
<xs:element name="enum" maxOccurs="unbounded" minOccurs="0" type="Enumeration"/>
<xs:element name="type" maxOccurs="unbounded" minOccurs="0" type="Type"/>
<xs:element name="array" maxOccurs="unbounded" minOccurs="0" type="Array"/>
<xs:element name="struct" maxOccurs="unbounded" minOccurs="0" type="Structure"/>
</xs:choice>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Namespace">
<xs:complexContent>
<xs:extension base="DeclarationBase">
<xs:sequence>
<xs:element name="interface" maxOccurs="unbounded" minOccurs="0" type="Interface"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="NSName" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Using">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="namespace" use="required" type="NSName"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TypeBase">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="name" use="required" type="PName" />
<xs:attribute name="size" default="-1" type="Size">
<xs:annotation>
<xs:documentation xml:lang="en">
"size" is used to denote fixed sized types.
Only fixed size types can be used in array and packed struct.
Array with a fixed size (dimension) is a fixed sized type,
and can be further used in an array or packed struct.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Type">
<xs:complexContent>
<xs:extension base="TypeBase">
<xs:sequence>
<xs:element name="lang" maxOccurs="unbounded" minOccurs="0" type="TypeLang"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TypeLang">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="name" use="required" type="xs:string" />
<xs:attribute name="type" use="required" type="xs:string" />
<xs:attribute name="include" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
"include" content is dependent on the language.
"size" is used to denote fixed sized types.
Only fixed size types can be used in array and packed struct.
Array with a fixed size (dimension) is a fixed sized type,
and can be further used in an array or packed struct.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DeclarationTypeBase">
<xs:complexContent>
<xs:extension base="TypeBase">
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="using" maxOccurs="unbounded" minOccurs="0" type="Using"/>
<xs:element name="enum" maxOccurs="unbounded" minOccurs="0" type="Enumeration"/>
<xs:element name="type" maxOccurs="unbounded" minOccurs="0" type="Type"/>
<xs:element name="array" maxOccurs="unbounded" minOccurs="0" type="Array"/>
<xs:element name="struct" maxOccurs="unbounded" minOccurs="0" type="Structure"/>
</xs:choice>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Structure">
<xs:complexContent>
<xs:extension base="DeclarationTypeBase">
<xs:sequence>
<xs:element name="elem" maxOccurs="unbounded" minOccurs="0" type="Elem"/>
</xs:sequence>
<xs:attribute name="type" use="optional" type="NSName"/>
<xs:attribute name="rttkey" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
rttkey defines the key value used to identify this
type from other types in the inheritance chain.
This key value is used to generate and register a type
specific factory.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="pack" default="false" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
Inherited "pack" takes prescedence.
If "pack" is true, all elems must be a fixed sized type and "ord" on elems are ignored.
"pack" impacts the XMF encoding.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ExtStruct">
<xs:complexContent>
<!-- This will eventually be a Structure derivative -->
<!-- Structure requires <elem> and has attribute "inherit" ... which should change to "type" -->
<xs:extension base="Structure">
<xs:attribute name="sid" use="optional" default="0" type="IntegerOrHex" />
<xs:attribute name="encoding" use="optional" default="native" type="Encoding">
<xs:annotation>
<xs:documentation xml:lang="en">
Document this.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ExtStyle">
<xs:complexContent>
<!-- This will eventually be a Structure derivative -->
<!-- Structure requires <elem> and has attribute "type" -->
<xs:extension base="ExtStruct">
<xs:attribute name="style" use="optional" default="callback" type="OutputStyle">
<xs:annotation>
<xs:documentation xml:lang="en">
Document this.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="OutputStyle">
<xs:restriction base="xs:token">
<xs:pattern value="callback|arg|return">
<xs:annotation>
<xs:documentation xml:lang="en">
native=native format (xmf, json, etc.), same as index=0.
raw=codec defined outside encoding, same as index=1.
xmf=always XMF, same as index=2.
json=always json, same as index=3.
number=index into encoding table (first 255 are reserved).
PName=dynamic, name of element that holds the encoding value.
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Size">
<xs:restriction base="xs:integer">
<xs:minInclusive value="-1"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Array">
<xs:annotation>
<xs:documentation xml:lang="en">
An Array with a fixed "size" can be used as a fixed sized type.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="TypeBase">
<xs:attribute name="type" use="required" type="NSName">
<xs:annotation>
<xs:documentation xml:lang="en">
Must be a type with a fixed "size".
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Enumeration">
<xs:complexContent>
<xs:extension base="TypeBase">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="literal" type="EnumerationLiteral"/>
</xs:sequence>
<xs:attribute name="type" use="required" type="EnumerationType"/>
<xs:attribute name="default" use="required" type="PName"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="EnumerationType">
<xs:restriction base="NSName">
<xs:enumeration value="Tensor.int8"/>
<xs:enumeration value="Tensor.uint8"/>
<xs:enumeration value="Tensor.int16"/>
<xs:enumeration value="Tensor.uint16"/>
<xs:enumeration value="Tensor.int32"/>
<xs:enumeration value="Tensor.uint32"/>
<xs:enumeration value="int8"/>
<xs:enumeration value="uint8"/>
<xs:enumeration value="int16"/>
<xs:enumeration value="uint16"/>
<xs:enumeration value="int32"/>
<xs:enumeration value="uint32"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="EnumerationLiteral">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="name" use="required" type="PName" />
<xs:attribute name="value" use="required" type="IntegerOrHex"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="IntegerOrHex">
<xs:restriction base="xs:token">
<xs:pattern value="((0)|([-]?[1-9][0-9]*)|(0x([0-9a-fA-F]{2})+))"/>
</xs:restriction>
</xs:simpleType>
<!--
<xs:complexType name="Tag">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="name" use="required" type="xs:normalizedString" />
<xs:attribute name="value" use="required" type="xs:normalizedString" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
-->
<xs:complexType name="Tag">
<xs:attribute name="name" use="required" type="xs:normalizedString" />
<xs:attribute name="value" use="required" type="xs:normalizedString" />
</xs:complexType>
<xs:complexType name="Elem">
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="name" use="required" type="PName" />
<xs:attribute name="type" use="required" type="NSName" />
<xs:attribute name="polymorphic" default="false" type="xs:boolean"/>
<xs:attribute name="multiplicity" default="1" type="Multiplicity"/>
<xs:attribute name="default" use="optional" type="xs:normalizedString"/>
<xs:attribute name="ord" default="L" type="LPGIntegerOrHex" />
<xs:attribute name="rttd" default="false" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">
rttd identified this element in the struct as
being the RTT Designator.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="encoding" use="optional" default="native" type="Encoding">
<xs:annotation>
<xs:documentation xml:lang="en">
rttkey defines the key value used to identify this
type from other types in the inheritance chain.
This key value is used to generate and register a type
specific factory.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="LPGIntegerOrHex">
<xs:restriction base="xs:token">
<xs:pattern value="(([LPG])|(0)|([1-9][0-9]*)|(0x([0-9a-fA-F]{2})+))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Multiplicity">
<xs:restriction base="xs:token">
<xs:enumeration value="0..1">
<xs:annotation>
<xs:documentation xml:lang="en">
Optional.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation xml:lang="en">
Required.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="0..*">
<xs:annotation>
<xs:documentation xml:lang="en">
Zero or more.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="1..*">
<xs:annotation>
<xs:documentation xml:lang="en">
Atleast one.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Encoding">
<xs:restriction base="xs:token">
<xs:pattern value="((native)|(raw)|(xmf)|(json)|(0)|([1-9][0-9]*)|(0x([0-9a-fA-F]{2}))|(0x([0-9a-fA-F]{4}))|([a-zA-Z][a-zA-Z0-9_]*))">
<xs:annotation>
<xs:documentation xml:lang="en">
native=native format (xmf, json, etc.), same as index=0.
raw=codec defined outside encoding, same as index=1.
xmf=always XMF, same as index=2.
json=always json, same as index=3.
number=index into encoding table (first 255 are reserved).
PName=dynamic, name of element that holds the encoding value.
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Interface">
<xs:complexContent>
<xs:extension base="DeclarationBase">
<xs:choice maxOccurs="unbounded" minOccurs="1">
<xs:element maxOccurs="unbounded" minOccurs="0" name="operation" type="Operation"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="event" type="Event"/>
</xs:choice>
<xs:attribute name="name" use="required" type="PName" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Operation">
<xs:complexContent>
<xs:extension base="DeclarationBase">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="input" type="ExtStruct"/>
<xs:element maxOccurs="1" minOccurs="0" name="output" type="ExtStyle"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="PName" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Event">
<xs:complexContent>
<xs:extension base="DeclarationBase">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="data" type="ExtStruct"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="PName" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>