-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTrias_FaresSupport.xsd
484 lines (484 loc) · 20 KB
/
Trias_FaresSupport.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
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
482
483
484
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.vdv.de/trias" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.vdv.de/trias" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Trias_Common.xsd"/>
<xs:simpleType name="TravelClassEnumeration">
<xs:annotation>
<xs:documentation>Enumeration of travel classes.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="all"/>
<xs:enumeration value="first"/>
<xs:enumeration value="second"/>
<xs:enumeration value="third"/>
<xs:enumeration value="business"/>
<xs:enumeration value="economy"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="UsageValidityTypeEnumeration">
<xs:annotation>
<xs:documentation>Enumeration of usage validity types for a ticket.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString">
<xs:enumeration value="singleTrip"/>
<xs:enumeration value="returnTrip"/>
<xs:enumeration value="connectingPass"/>
<xs:enumeration value="multiRidePass"/>
<xs:enumeration value="carnet"/>
<xs:enumeration value="dayPass"/>
<xs:enumeration value="24HourPass"/>
<xs:enumeration value="weeklyPass"/>
<xs:enumeration value="weekendPass"/>
<xs:enumeration value="monthlyPass"/>
<xs:enumeration value="halfYearPass"/>
<xs:enumeration value="annualPass"/>
<xs:enumeration value="seasonTicket"/>
<xs:enumeration value="profileMembership"/>
<xs:enumeration value="openEnded"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="VatRateEnumeration">
<xs:annotation>
<xs:documentation>Enumeration of Value Added Tax rates.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="no"/>
<xs:enumeration value="full"/>
<xs:enumeration value="half"/>
<xs:enumeration value="mixed"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
<!-- ========================================== Fares Authority ============================= -->
<xs:simpleType name="FaresAuthorityCodeType">
<xs:annotation>
<xs:documentation>Identifier of a Fares Authority.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN"/>
</xs:simpleType>
<xs:complexType name="FaresAuthorityRefStructure">
<xs:annotation>
<xs:documentation>Reference to a Fares Authority.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="FaresAuthorityCodeType"/>
</xs:simpleContent>
</xs:complexType>
<xs:element name="FaresAuthorityRef" type="FaresAuthorityRefStructure">
<xs:annotation>
<xs:documentation>Reference to a Fares Authority.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group name="FaresAuthorityGroup">
<xs:annotation>
<xs:documentation>Group of Fares Authority code and text.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="FaresAuthorityRef"/>
<xs:element name="FaresAuthorityText" type="xs:string">
<xs:annotation>
<xs:documentation>Textual description or name of fares authority.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:annotation>
<xs:documentation>========================================= Zones ================================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="FareZoneCodeType">
<xs:annotation>
<xs:documentation>Identifier of a fare zone.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN"/>
</xs:simpleType>
<xs:complexType name="FareZoneRefStructure">
<xs:annotation>
<xs:documentation>Reference to a fare zone.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="FareZoneCodeType"/>
</xs:simpleContent>
</xs:complexType>
<xs:element name="FareZoneRef" type="FareZoneRefStructure">
<xs:annotation>
<xs:documentation>Reference to a fare zone.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="FareZoneStructure">
<xs:annotation>
<xs:documentation>Model of a fare zone</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="FareZoneRef"/>
<xs:element name="FareZoneText" type="xs:string">
<xs:annotation>
<xs:documentation>Text describing the fare zone. Passengers will recognize the fare zone by this text. Often published on Fare Zone Maps.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FareZoneListInAreaStructure">
<xs:annotation>
<xs:documentation>List of fare zones within the area of a Fares Authority.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="FaresAuthorityGroup"/>
<xs:element name="FareZone" type="FareZoneStructure" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Fare zone in area.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FareZoneRefListStructure">
<xs:annotation>
<xs:documentation>List of fare zones references within the area of a Fares Authority.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="FaresAuthorityRef"/>
<xs:element ref="FareZoneRef" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================= Passengers ==============================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="PassengerCategoryEnumeration">
<xs:annotation>
<xs:documentation>Classification of passengers for ticket pricing.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Adult"/>
<xs:enumeration value="Child"/>
<xs:enumeration value="Senior"/>
<xs:enumeration value="Youth"/>
<xs:enumeration value="Disabled"/>
</xs:restriction>
</xs:simpleType>
<xs:annotation>
<xs:documentation>========================================= Booking ==============================================</xs:documentation>
</xs:annotation>
<xs:complexType name="BookingInfoStructure">
<xs:annotation>
<xs:documentation>Description of a booking opportunity.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="BookingAgencyName" type="InternationalTextStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the booking agency (contractual partner).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BookingUrl" type="xs:anyURI" minOccurs="0">
<xs:annotation>
<xs:documentation>URL to online booking service.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InfoUrl" type="xs:anyURI" minOccurs="0">
<xs:annotation>
<xs:documentation>URL to information page.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PhoneNumber" type="PhoneNumberType" minOccurs="0">
<xs:annotation>
<xs:documentation>Phone number for booking.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BookingDeadline" type="xs:duration" minOccurs="0">
<xs:annotation>
<xs:documentation>Minimum duration bookings must be completed before trip starts.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Extension" type="xs:anyType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================= Tickets ==============================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="TicketCodeType">
<xs:annotation>
<xs:documentation>Identifier of a ticket.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN"/>
</xs:simpleType>
<xs:complexType name="TicketRefStructure">
<xs:annotation>
<xs:documentation>Reference to a ticket.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="TicketCodeType"/>
</xs:simpleContent>
</xs:complexType>
<xs:element name="TicketRef" type="TicketRefStructure">
<xs:annotation>
<xs:documentation>Reference to a ticket.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:simpleType name="TravellerCardCodeType">
<xs:annotation>
<xs:documentation>Identifier of a traveller card (f.e. BahnCard50, BahnCard50First etc.).</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:NMTOKEN"/>
</xs:simpleType>
<xs:complexType name="TravellerCardRefStructure">
<xs:annotation>
<xs:documentation>Reference to a traveller card.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="TravellerCardCodeType"/>
</xs:simpleContent>
</xs:complexType>
<xs:element name="TravellerCardRef" type="TravellerCardRefStructure">
<xs:annotation>
<xs:documentation>Reference to a traveller card.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="TicketStructure">
<xs:annotation>
<xs:documentation>Model of a ticket and related information.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TicketId" type="TicketCodeType">
<xs:annotation>
<xs:documentation>Unique Id of the ticket.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TicketName" type="xs:string">
<xs:annotation>
<xs:documentation>printable ticket name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="FaresAuthorityGroup"/>
<xs:group ref="TicketPriceGroup"/>
<xs:group ref="TariffLevelGroup"/>
<xs:group ref="TicketValidityGroup"/>
<xs:group ref="TicketBookingGroup"/>
<xs:element name="Extension" type="xs:anyType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:group name="TicketPriceGroup">
<xs:annotation>
<xs:documentation>Details on the ticket price.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Price" type="xs:decimal" minOccurs="0">
<xs:annotation>
<xs:documentation>Ticket price as decimal number.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NetPrice" type="xs:decimal" minOccurs="0">
<xs:annotation>
<xs:documentation>Net ticket price as decimal number for accounting purposes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Currency" type="xs:NMTOKEN" minOccurs="0">
<xs:annotation>
<xs:documentation>iso 4217 currency code, e.g. EUR for Euro or GBP for Pound Sterling</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VatRate" type="VatRateEnumeration" minOccurs="0">
<xs:annotation>
<xs:documentation>Rate of value added tax. Default is unknown.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="TariffLevelGroup">
<xs:annotation>
<xs:documentation>Details on the tariff level.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TariffLevel" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Name of the tariff level (e.g. "10", "10+T").</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TariffLevelLabel" type="InternationalTextStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>General label for tariff levels in this ticket context (e.g. "Fare stage", "Tariff level").</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="TicketValidityGroup">
<xs:annotation>
<xs:documentation>Terms and conditions associated with the ticket.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TravelClass" type="TravelClassEnumeration" minOccurs="0">
<xs:annotation>
<xs:documentation>Travel class for which the ticket is valid.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RequiredCard" type="TravellerCardRefStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>One or more traveller cards that are needed for purchase of this ticket. In most cases traveller cards offer discounts, f.e. BahnCard50 of Deutsche Bahn.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ValidFor" type="PassengerCategoryEnumeration" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Sequence of all passenger categories for which this ticket is valid.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ValidityDuration" type="xs:duration" minOccurs="0">
<xs:annotation>
<xs:documentation>Maximum duration of ticket validity starting with purchase of ticket or begin of journey (ticket validation).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ValidityDurationText" type="InternationalTextStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Textual description of maximum validity duration.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ValidityFareZones" type="FareZoneListInAreaStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Spatial validity of ticket defined as list of fare zones.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ValidityAreaText" type="InternationalTextStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Textual description of spatial validity.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UsageValidityType" type="UsageValidityTypeEnumeration" minOccurs="0"/>
</xs:sequence>
</xs:group>
<xs:group name="TicketBookingGroup">
<xs:annotation>
<xs:documentation>Group of information elements related to booking (f.e. links to static information or to the online shop).</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="InfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URL to information for this ticket</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SaleUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URL to buy the ticket online</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BookingInfo" type="BookingInfoStructure" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
<xs:annotation>
<xs:documentation>========================================= Trip fares ==============================================</xs:documentation>
</xs:annotation>
<xs:group name="TripLegRangeGroup">
<xs:annotation>
<xs:documentation>Range of trip legs (from - to) for which a fares result (ticket) is valid.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="FromTripLegIdRef" type="xs:NMTOKEN">
<xs:annotation>
<xs:documentation>Identifies the "valid from" trip leg.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ToTripLegIdRef" type="xs:NMTOKEN">
<xs:annotation>
<xs:documentation>Identifies the "valid to" trip leg.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:complexType name="TripFaresResultStructure">
<xs:annotation>
<xs:documentation>Structure of a Single Trip Fare Request result</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ErrorMessage" type="ErrorMessageStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Result-specific error messages</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="TripLegRangeGroup" minOccurs="0"/>
<xs:element name="PassedZones" type="FareZoneListInAreaStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>The sequence of passed fare zones.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Ticket" type="TicketStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>One ore more tickets that are valid for this part of the trip.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StaticInfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URL to static information page on the web.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================= Fares request parameter ==============================================</xs:documentation>
</xs:annotation>
<xs:complexType name="FaresPassengerStructure">
<xs:annotation>
<xs:documentation>Structure of a passenger profile for fares calculation.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:choice>
<xs:element name="Age" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Age of the passenger on the day of travel.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PassengerCategory" type="PassengerCategoryEnumeration">
<xs:annotation>
<xs:documentation>sequence of all passenger categories, for which this ticket is valid</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element name="TravellerCard" type="TravellerCardRefStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>One or more traveller cards that the passenger can make use of.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="ZonesAlreadyPaid" type="FareZoneRefListStructure">
<xs:annotation>
<xs:documentation>Fare zones for which the passenger already has a valid ticket.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OwnedTicket" type="TicketRefStructure" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Id of a ticket that the passenger already holds and that may be used for the travel or parts of it.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:group name="FaresDataFilterGroup">
<xs:annotation>
<xs:documentation>Data filter group for fares request.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="FareAuthorityFilter" type="FaresAuthorityRefStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Fare authority for which to retrieve fares information.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PassengerCategory" type="PassengerCategoryEnumeration" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Passenger categories for which to retrieve fares information.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TravelClass" type="TravelClassEnumeration" minOccurs="0">
<xs:annotation>
<xs:documentation>Travel class for which to retrieve tickets.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:complexType name="FaresParamStructure">
<xs:annotation>
<xs:documentation>Parameters for fares request.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="FaresDataFilterGroup"/>
<xs:element name="Traveller" type="FaresPassengerStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Number of travellers that will make the journey and for which fares information needs to be gathered.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>