-
Notifications
You must be signed in to change notification settings - Fork 0
/
trainStation.xsd
435 lines (414 loc) · 22.6 KB
/
trainStation.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
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
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://inventivio.com/trainstation" xmlns:ts="http://inventivio.com/trainstation" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!--attributeGroup does not work...-->
<!-- targetNamespace and the xmlns:ts are necessary to define and use global types or attributes. -->
<!-- https://docs.microsoft.com/en-us/sql/relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-a-target-namespace-using-the-targetnamespace-attribute-sqlxml-4-0?view=sql-server-ver16 -->
<!-- Problably will not use -->
<!--
<xs:complexType name="GlobalComplexType">
<xs:sequence>
<xs:element name="Example1" type="xs:string" />
<xs:element name="Example2" type="xs:string" />
</xs:sequence>
</xs:complexType>
-->
<!-- Combination of global type and global attribute:
<xs:simpleType name="example">
<xs:restriction base="xs:string">
<xs:enumeration value="pounds" />
<xs:enumeration value="euros" />
<xs:enumeration value="dollars" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="shoeSizes" default="pounds">
<xs:simpleType>
<xs:list itemType="ts:example"/>
</xs:simpleType>
</xs:attribute> -->
<!-- GLOBAL types with restrictions -->
<xs:simpleType name="elevation_G">
<xs:restriction base="xs:integer">
<xs:minInclusive value="-10"/>
<xs:maxInclusive value="20"/>
</xs:restriction>
</xs:simpleType>
<!-- https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256162(v=vs.100) -->
<!-- Example: <myelement listOfIntegers='1 100 9 4000 0'/> -->
<xs:simpleType name="listOfIntegers_G">
<xs:list itemType="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="listOfFloat_G">
<xs:list itemType="xs:float"/>
</xs:simpleType>
<!-- not being used for now -->
<xs:simpleType name='restrictedListOfIntegers_G'>
<xs:restriction base='ts:listOfIntegers_G'>
<xs:maxLength value='5'/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='pointXY_G'>
<xs:restriction base='ts:listOfFloat_G'>
<xs:maxLength value='2'/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="typeWC_G">
<xs:restriction base="xs:string">
<xs:enumeration value="men" />
<xs:enumeration value="women" />
<xs:enumeration value="mix" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="typeSHOP_G">
<xs:restriction base="xs:string">
<xs:enumeration value="restaurant" />
<xs:enumeration value="pharmacy" />
<xs:enumeration value="bakery" />
<xs:enumeration value="supermarket" />
</xs:restriction>
</xs:simpleType>
<xs:element name="trainstation">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="mainbuildingArea" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="shop" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" default="shop"/>
<xs:attribute type="xs:string" name="description"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional"/>
<xs:attribute type="ts:typeSHOP_G" name="type-of-shop"/>
<xs:attribute type="xs:string" name="opening-hours"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="wc" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" default="wc"/>
<xs:attribute type="xs:string" name="description" default="rest room"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="ts:typeWC_G" name="type" default="mix"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="entrance" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" default="entrance"/>
<xs:attribute type="xs:string" name="description"/>
<xs:attribute type="xs:string" name="outsideA"/> <!-- from outside(zone A) to inside (zone B) use ID's of paths. If we do not know use namming only -->
<xs:attribute type="xs:string" name="insideB"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="ts:listOfIntegers_G" name="list-of-floors" use="optional"/>
<xs:attribute type="xs:integer" name="numberofentrances"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
<!-- <xs:attribute ref="ts:shoeSizes" use="required"/> -->
</xs:complexType>
</xs:element>
<xs:element name="outsideArea" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="street" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional" default="street"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute type="xs:string" name="intersectWith" use="optional"/> <!-- what are the other streets and roundabouts that this intersects with (ID's) -->
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="roundabout" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute type="xs:string" name="intersectWith" use="optional"/> <!-- what are the other streets and roundabouts that this intersects with (ID's) -->
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="building" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional" default="external building"/>
<xs:attribute type="ts:listOfIntegers_G" name="list-of-floors" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="green-space" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="river" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute type="xs:string" name="river-flow-direction" use="optional"/> <!-- can be implemented later -->
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="bike-road" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="pedestrian-road" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="intersectWith" type="xs:string" use="optional"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!-- Another name for foorpath is fussweg in German -->
<xs:element name="footpath" maxOccurs="unbounded" minOccurs="0"> <!-- This is represented with a line like ______ with directions that the user can take -->
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="ts:pointXY_G" name="pointA" use="optional"/> <!-- starting point(x,y) and end point (x,y) -->
<xs:attribute type="ts:pointXY_G" name="pointB" use="optional"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="square-space" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="bike-park" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="car-park" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="stop-BUS" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="stop-SEV" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="platformArea" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="railroad" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="type" use="optional"/>
<xs:attribute type="xs:string" name="directionA" use="optional"/>
<xs:attribute type="xs:string" name="directionB" use="optional"/>
<xs:attribute type="xs:string" name="description" use="optional"/>
<xs:attribute type="xs:byte" name="number" use="required"/>
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="platform" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="underground-path" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="bridge-path" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="stairs" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/> <!-- rolling stairs and normal stairs detail -->
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="entrance" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" default="entrance"/>
<xs:attribute type="xs:string" name="description"/>
<xs:attribute type="xs:string" name="outsideA"/> <!-- from outside(zone A) to inside (zone B) use ID's of paths. If we do not know use namming only -->
<xs:attribute type="xs:string" name="insideB"/>
<xs:attribute name="floor-level" type="ts:elevation_G" default="0" use="optional" />
<xs:attribute type="xs:string" name="ref" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="ticket-machine" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="info-point" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="elevator" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="list-of-floors" type="ts:listOfIntegers_G" use="optional"/> <!-- also used in mainbuildingArea -->
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="crossing-gate" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="ref" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="lang" default="english"/> <!-- focus on english translations for now -->
<xs:attribute type="xs:string" name="name" use="required"/> <!-- Name of the train station -->
<xs:attribute type="xs:string" name="scale" use="optional"/> <!-- scale, 1 pixel corresponds to how many meters -->
<xs:attribute type="xs:integer" name="compass-orientation" default="360"/> <!-- use the degress of rotation to know the orientation -->
<xs:attribute type="xs:integer" name="year" use="optional"/>
<xs:attribute type="xs:string" name="organization" use="optional" default="DB"/>
<!-- not necessary: <xs:attribute type="xs:string" name="ref" use="required"/> -->
</xs:complexType>
</xs:element>
</xs:schema>