1
- <xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform" xmlns : siri =" http://www.siri.org.uk/siri" xmlns : ojp =" http://www.vdv.de/ojp" xmlns =" http://www.vdv.de/trias" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
1
+ <xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform"
2
+ xmlns : trias =" http://www.vdv.de/trias"
3
+ xmlns : siri =" http://www.siri.org.uk/siri"
4
+ xmlns : ojp =" http://www.vdv.de/ojp"
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
2
6
<xsl : output method =" xml" encoding =" UTF-8" indent =" yes" />
3
7
4
8
<xsl : template match =" ojp:OJP" >
5
- <Trias version =" 1.2" xmlns =" http://www.vdv.de/trias" xmlns : siri =" http://www.siri.org.uk/siri" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://www.vdv.de/trias https://raw.githubusercontent.com/VDVde/TRIAS/refs/tags/v1.2/Trias.xsd" >
9
+ <trias : Trias version =" 1.2"
10
+ xmlns : trias =" http://www.vdv.de/trias"
11
+ xmlns : siri =" http://www.siri.org.uk/siri"
12
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
13
+ xsi : schemaLocation =" http://www.vdv.de/trias https://raw.githubusercontent.com/VDVde/TRIAS/refs/tags/v1.2/Trias.xsd" >
6
14
<xsl : apply-templates select =" ojp:OJPResponse" />
7
- </Trias >
15
+ </trias : Trias >
8
16
</xsl : template >
9
17
<!-- *********************************************-->
10
18
<xsl : template match =" ojp:OJPResponse" >
13
21
<!-- *********************************************-->
14
22
15
23
<xsl : template match =" siri:ServiceDelivery" >
16
- <ServiceDelivery >
24
+ <trias : ServiceDelivery >
17
25
<siri : ResponseTimestamp >
18
26
<xsl : value-of select =" //siri:ResponseTimestamp[1]" />
19
27
</siri : ResponseTimestamp >
24
32
<xsl : apply-templates select =" ojp:OJPStopEventDelivery" />
25
33
<xsl : apply-templates select =" siri:ErrorCondition" />
26
34
27
- </ServiceDelivery >
35
+ </trias : ServiceDelivery >
28
36
</xsl : template >
29
37
<!-- *********************************************-->
30
38
31
39
<xsl : template match =" ojp:OJPStopEventDelivery" >
32
- <DeliveryPayload >
33
- <StopEventResponse >
40
+ <trias : DeliveryPayload >
41
+ <trias : StopEventResponse >
34
42
<xsl : apply-templates select =" ojp:StopEventResponseContext" />
35
43
<xsl : apply-templates select =" ojp:StopEventResult" />
36
- </StopEventResponse >
37
- </DeliveryPayload >
44
+ </trias : StopEventResponse >
45
+ </trias : DeliveryPayload >
38
46
</xsl : template >
39
47
40
48
<!-- *********************************************-->
48
56
49
57
<!-- *********************************************-->
50
58
<xsl : template match =" ojp:StopEventResponseContext" >
51
- <StopEventResponseContext >
59
+ <trias : StopEventResponseContext >
52
60
<xsl : apply-templates select =" ojp:Places" />
53
- </StopEventResponseContext >
61
+ </trias : StopEventResponseContext >
54
62
</xsl : template >
55
63
<xsl : template match =" ojp:Places" >
56
- <Locations >
64
+ <trias : Locations >
57
65
<xsl : apply-templates select =" ojp:Place" />
58
- </Locations >
66
+ </trias : Locations >
59
67
</xsl : template >
60
68
<!-- *********************************************-->
61
69
<xsl : template match =" ojp:StopEventResult" >
62
- <StopEventResult >
63
- <ResultId >
70
+ <trias : StopEventResult >
71
+ <trias : ResultId >
64
72
<xsl : value-of select =" ojp:Id" />
65
- </ResultId >
73
+ </trias : ResultId >
66
74
<xsl : apply-templates select =" ojp:StopEvent" />
67
- </StopEventResult >
75
+ </trias : StopEventResult >
68
76
</xsl : template >
69
77
<!-- *********************************************-->
70
78
<xsl : template match =" ojp:Place" >
71
- <Location >
79
+ <trias : Location >
72
80
<xsl : apply-templates select =" ojp:StopPlace" />
73
81
<xsl : apply-templates select =" ojp:StopPoint" />
74
- <LocationName >
75
- <Text ><xsl : value-of select =" ojp:Name/ojp:Text" /></Text >
76
- </LocationName >
82
+ <trias : LocationName >
83
+ <trias : Text ><xsl : value-of select =" ojp:Name/ojp:Text" /></trias : Text >
84
+ </trias : LocationName >
77
85
<xsl : apply-templates select =" ojp:GeoPosition" />
78
- </Location >
86
+ </trias : Location >
79
87
<!-- *********************************************-->
80
88
</xsl : template >
81
89
<xsl : template match =" ojp:GeoPosition" >
82
- <GeoPosition >
83
- <Longitude >
90
+ <trias : GeoPosition >
91
+ <trias : Longitude >
84
92
<xsl : value-of select =" siri:Longitude" />
85
- </Longitude >
86
- <Latitude >
93
+ </trias : Longitude >
94
+ <trias : Latitude >
87
95
<xsl : value-of select =" siri:Latitude" />
88
- </Latitude >
89
- </GeoPosition >
96
+ </trias : Latitude >
97
+ </trias : GeoPosition >
90
98
</xsl : template >
91
99
<!-- *********************************************-->
92
100
<xsl : template match =" ojp:StopPlace" >
93
- <StopPlace >
94
- <StopPlaceRef >
101
+ <trias : StopPlace >
102
+ <trias : StopPlaceRef >
95
103
<xsl : value-of select =" ojp:StopPlaceRef" />
96
- </StopPlaceRef >
97
- <StopPlaceName >
98
- <Text ><xsl : value-of select =" normalize-space(ojp:StopPlaceName)" /></Text >
99
- </StopPlaceName >
104
+ </trias : StopPlaceRef >
105
+ <trias : StopPlaceName >
106
+ <trias : Text ><xsl : value-of select =" normalize-space(ojp:StopPlaceName)" /></trias : Text >
107
+ </trias : StopPlaceName >
100
108
101
- <PrivateCode >
102
- <System ><xsl : value-of select =" ojp:PrivateCode/ojp:System" /></System >
103
- <Value ><xsl : value-of select =" ojp:PrivateCode/ojp:Value" /></Value >
104
- </PrivateCode >
109
+ <trias : PrivateCode >
110
+ <trias : System ><xsl : value-of select =" ojp:PrivateCode/ojp:System" /></trias : System >
111
+ <trias : Value ><xsl : value-of select =" ojp:PrivateCode/ojp:Value" /></trias : Value >
112
+ </trias : PrivateCode >
105
113
<!-- <xsl:if test="ojp:TopographicPlaceRef">
106
114
<TopographicPlaceRef><xsl:value-of select="ojp:TopographicPlaceRef"/></TopographicPlaceRef></xsl:if>-->
107
- </StopPlace >
115
+ </trias : StopPlace >
108
116
</xsl : template >
109
117
<!-- *********************************************-->
110
118
<xsl : template match =" ojp:StopPoint" >
111
- <StopPoint >
112
- <StopPointRef >
119
+ <trias : StopPoint >
120
+ <trias : StopPointRef >
113
121
<xsl : value-of select =" siri:StopPointRef" />
114
- </StopPointRef >
115
- <StopPointName >
122
+ </trias : StopPointRef >
123
+ <trias : StopPointName >
116
124
<xsl : apply-templates select =" ojp:StopPointName" />
117
- </StopPointName >
118
- <PrivateCode >
119
- <System ><xsl : value-of select =" ojp:PrivateCode/ojp:System" />
120
- </System >
125
+ </trias : StopPointName >
126
+ <trias : PrivateCode >
127
+ <trias : System ><xsl : value-of select =" ojp:PrivateCode/ojp:System" />
128
+ </trias : System >
121
129
<Value ><xsl : value-of select =" ojp:PrivateCode/ojp:Value" /></Value >
122
- </PrivateCode >
130
+ </trias : PrivateCode >
123
131
<!-- <xsl:if test="ojp:TopographicPlaceRef">
124
132
<TopographicPlaceRef><xsl:value-of select="ojp:TopographicPlaceRef"/></TopographicPlaceRef></xsl:if> -->
125
- </StopPoint >
133
+ </trias : StopPoint >
126
134
</xsl : template >
127
135
<!-- *********************************************-->
128
136
<xsl : template match =" ojp:CallAtStop" >
129
- <CallAtStop >
130
- <StopPointRef >
137
+ <trias : CallAtStop >
138
+ <trias : StopPointRef >
131
139
<xsl : value-of select =" siri:StopPointRef" />
132
- </StopPointRef >
133
- <StopPointName >
140
+ </trias : StopPointRef >
141
+ <trias : StopPointName >
134
142
<xsl : apply-templates select =" ojp:StopPointName" />
135
- </StopPointName >
136
- <PlannedBay >
143
+ </trias : StopPointName >
144
+ <trias : PlannedBay >
137
145
<xsl : apply-templates select =" ojp:PlannedQuay" />
138
- </PlannedBay >
146
+ </trias : PlannedBay >
139
147
<xsl : if test =" ojp:EstimatedQuay" >
140
- <EstimatedBay >
148
+ <trias : EstimatedBay >
141
149
<Text ><xsl : value-of select =" ojp:EstimatedQuay/ojp:Text" /></Text >
142
- </EstimatedBay >
150
+ </trias : EstimatedBay >
143
151
</xsl : if >
144
152
<xsl : apply-templates select =" ojp:ServiceArrival" />
145
153
<xsl : apply-templates select =" ojp:ServiceDeparture" />
146
154
<xsl : if test =" ojp:Order" >
147
- <StopSeqNumber ><xsl : value-of select =" ojp:Order" /></StopSeqNumber >
155
+ <trias : StopSeqNumber ><xsl : value-of select =" ojp:Order" /></trias : StopSeqNumber >
148
156
</xsl : if >
149
157
<xsl : if test =" ojp:RequestStop" >
150
- <DemandStop ><xsl : value-of select =" ojp:RequestStop" /></DemandStop >
158
+ <trias : DemandStop ><xsl : value-of select =" ojp:RequestStop" /></trias : DemandStop >
151
159
</xsl : if >
152
160
<xsl : if test =" ojp:UnplannedStop" >
153
- <UnplannedStop ><xsl : value-of select =" ojp:UnplannedStop" /></UnplannedStop >
161
+ <trias : UnplannedStop ><xsl : value-of select =" ojp:UnplannedStop" /></trias : UnplannedStop >
154
162
</xsl : if >
155
163
<xsl : if test =" ojp:NotServicedStop" >
156
- <NotServicedStop ><xsl : value-of select =" ojp:NotServicedStop" /></NotServicedStop >
164
+ <trias : NotServicedStop ><xsl : value-of select =" ojp:NotServicedStop" /></trias : NotServicedStop >
157
165
</xsl : if >
158
166
<xsl : if test =" ojp:NoBoardingAtStop" >
159
- <NoBoardingAtStop ><xsl : value-of select =" ojp:NoBoardingAtStop" /></NoBoardingAtStop >
167
+ <trias : NoBoardingAtStop ><xsl : value-of select =" ojp:NoBoardingAtStop" /></trias : NoBoardingAtStop >
160
168
</xsl : if >
161
169
<xsl : if test =" ojp:NoAlightingAtStop" >
162
- <NoAlightingAtStop ><xsl : value-of select =" ojp:NoAlightingAtStop" /></NoAlightingAtStop >
170
+ <trias : NoAlightingAtStop ><xsl : value-of select =" ojp:NoAlightingAtStop" /></trias : NoAlightingAtStop >
163
171
</xsl : if >
164
- </CallAtStop >
172
+ </trias : CallAtStop >
165
173
</xsl : template >
166
174
<!-- *********************************************-->
167
175
<xsl : template match =" ojp:ServiceArrival" >
168
- <ServiceArrival >
176
+ <trias : ServiceArrival >
169
177
<xsl : if test =" ojp:TimetabledTime" >
170
- <TimetabledTime ><xsl : value-of select =" ojp:TimetabledTime" /></TimetabledTime >
178
+ <trias : TimetabledTime ><xsl : value-of select =" ojp:TimetabledTime" /></trias : TimetabledTime >
171
179
</xsl : if >
172
180
<xsl : if test =" ojp:EstimatedTime" >
173
- <EstimatedTime ><xsl : value-of select =" ojp:EstimatedTime" /></EstimatedTime >
181
+ <trias : EstimatedTime ><xsl : value-of select =" ojp:EstimatedTime" /></trias : EstimatedTime >
174
182
</xsl : if >
175
- </ServiceArrival >
183
+ </trias : ServiceArrival >
176
184
177
185
</xsl : template >
178
186
<!-- *********************************************-->
179
187
<xsl : template match =" ojp:ServiceDeparture" >
180
- <ServiceDeparture >
188
+ <trias : ServiceDeparture >
181
189
<xsl : if test =" ojp:TimetabledTime" >
182
- <TimetabledTime ><xsl : value-of select =" ojp:TimetabledTime" /></TimetabledTime >
190
+ <trias : TimetabledTime ><xsl : value-of select =" ojp:TimetabledTime" /></trias : TimetabledTime >
183
191
</xsl : if >
184
192
<xsl : if test =" ojp:EstimatedTime" >
185
- <EstimatedTime ><xsl : value-of select =" ojp:EstimatedTime" /></EstimatedTime >
193
+ <trias : EstimatedTime ><xsl : value-of select =" ojp:EstimatedTime" /></trias : EstimatedTime >
186
194
</xsl : if >
187
- </ServiceDeparture >
195
+ </trias : ServiceDeparture >
188
196
189
197
</xsl : template >
190
198
<!-- *********************************************-->
191
199
<xsl : template match =" ojp:StopEvent" >
192
- <StopEvent >
200
+ <trias : StopEvent >
193
201
<xsl : apply-templates select =" ojp:PreviousCall" />
194
202
<xsl : apply-templates select =" ojp:ThisCall" />
195
203
<xsl : apply-templates select =" ojp:OnwardCall" />
196
204
<xsl : apply-templates select =" ojp:Service" />
197
- <Extension >
205
+ <trias : Extension >
198
206
<xsl : if test =" ojp:Service/ojp:TrainNumber" >
199
- <TrainNumber ><xsl : value-of select =" ojp:Service/ojp:TrainNumber" /></TrainNumber >
207
+ <trias : TrainNumber ><xsl : value-of select =" ojp:Service/ojp:TrainNumber" /></trias : TrainNumber >
200
208
</xsl : if >
201
209
<xsl : if test =" ojp:Service/ojp:ProductCategory" >
202
- <ProductCategory ><xsl : value-of select =" ojp:Service/ojp:ProductCategory/ojp:ShortName/ojp:Text" /></ProductCategory >
210
+ <trias : ProductCategory ><xsl : value-of select =" ojp:Service/ojp:ProductCategory/ojp:ShortName/ojp:Text" /></trias : ProductCategory >
203
211
</xsl : if >
204
- </Extension >
205
- </StopEvent >
212
+ </trias : Extension >
213
+ </trias : StopEvent >
206
214
</xsl : template >
207
215
<!-- *********************************************-->
208
216
<xsl : template match =" ojp:ThisCall" >
209
- <ThisCall >
217
+ <trias : ThisCall >
210
218
<xsl : apply-templates select =" ojp:CallAtStop" />
211
219
<xsl : if test =" ojp:WalkDuration" >
212
- <WalkDuration ><xsl : value-of select =" ojp:WalkDuration" /></WalkDuration >
220
+ <trias : WalkDuration ><xsl : value-of select =" ojp:WalkDuration" /></trias : WalkDuration >
213
221
</xsl : if >
214
222
<xsl : if test =" ojp:WalkDistance" >
215
- <WalkDistance ><xsl : value-of select =" ojp:WalkDistance" /></WalkDistance >
223
+ <trias : WalkDistance ><xsl : value-of select =" ojp:WalkDistance" /></trias : WalkDistance >
216
224
</xsl : if >
217
- </ThisCall >
225
+ </trias : ThisCall >
218
226
</xsl : template >
219
227
<!-- *********************************************-->
220
228
<xsl : template match =" ojp:PreviousCall" >
221
- <PreviousCall >
229
+ <trias : PreviousCall >
222
230
<xsl : apply-templates select =" ojp:CallAtStop" />
223
- </PreviousCall >
231
+ </trias : PreviousCall >
224
232
</xsl : template >
225
233
<!-- *********************************************-->
226
234
<xsl : template match =" ojp:OnwardCall" >
227
- <OnwardCall >
235
+ <trias : OnwardCall >
228
236
<xsl : apply-templates select =" ojp:CallAtStop" />
229
- </OnwardCall >
237
+ </trias : OnwardCall >
230
238
</xsl : template >
231
239
<!-- *********************************************-->
232
240
<xsl : template match =" ojp:Text" >
233
- <Text ><xsl : value-of select =" text()" /></Text >
234
- <Language ><xsl : value-of select =" @xml:lang" /></Language >
241
+ <trias : Text ><xsl : value-of select =" text()" /></trias : Text >
242
+ <trias : Language ><xsl : value-of select =" @xml:lang" /></trias : Language >
235
243
</xsl : template >
236
244
<!-- *********************************************-->
237
245
<xsl : template match =" ojp:Service" >
238
- <Service >
239
- <OperatingDayRef ><xsl : value-of select =" ojp:OperatingDayRef" /></OperatingDayRef >
240
- <JourneyRef ><xsl : value-of select =" ojp:JourneyRef" /></JourneyRef >
241
- <ServiceSection >
242
- <LineRef ><xsl : value-of select =" siri:LineRef" /></LineRef >
243
- <DirectionRef ><xsl : value-of select =" siri:DirectionRef" /></DirectionRef >
244
- <Mode >
245
- <PtMode ><xsl : value-of select =" ojp:Mode/ojp:PtMode" /></PtMode >
246
+ <trias : Service >
247
+ <trias : OperatingDayRef ><xsl : value-of select =" ojp:OperatingDayRef" /></trias : OperatingDayRef >
248
+ <trias : JourneyRef ><xsl : value-of select =" ojp:JourneyRef" /></trias : JourneyRef >
249
+ <trias : ServiceSection >
250
+ <trias : LineRef ><xsl : value-of select =" siri:LineRef" /></trias : LineRef >
251
+ <trias : DirectionRef ><xsl : value-of select =" siri:DirectionRef" /></trias : DirectionRef >
252
+ <trias : Mode >
253
+ <trias : PtMode ><xsl : value-of select =" ojp:Mode/ojp:PtMode" /></trias : PtMode >
246
254
<!-- Handling of SubMode -->
247
- </Mode >
248
- <PublishedLineName >
249
- <Text ><xsl : value-of select =" normalize-space(ojp:PublishedServiceName)" /></Text >
250
- </PublishedLineName >
251
- <OperatorRef ><xsl : value-of select =" siri:OperatorRef" /></OperatorRef >
252
- </ServiceSection >
253
- <OriginStopPointRef >
255
+ </trias : Mode >
256
+ <trias : PublishedLineName >
257
+ <trias : Text ><xsl : value-of select =" normalize-space(ojp:PublishedServiceName)" /></trias : Text >
258
+ </trias : PublishedLineName >
259
+ <trias : OperatorRef ><xsl : value-of select =" siri:OperatorRef" /></trias : OperatorRef >
260
+ </trias : ServiceSection >
261
+ <trias : OriginStopPointRef >
254
262
<xsl : value-of select =" ojp:OriginStopPointRef" />
255
- </OriginStopPointRef >
256
- <OriginText >
263
+ </trias : OriginStopPointRef >
264
+ <trias : OriginText >
257
265
<xsl : apply-templates select =" ojp:OriginText" />
258
- </OriginText >
259
- <DestinationStopPointRef >
266
+ </trias : OriginText >
267
+ <trias : DestinationStopPointRef >
260
268
<xsl : value-of select =" ojp:DestinationStopPointRef" />
261
- </DestinationStopPointRef >
262
- <DestinationText >
269
+ </trias : DestinationStopPointRef >
270
+ <trias : DestinationText >
263
271
<xsl : apply-templates select =" ojp:DestinationText" />
264
- </DestinationText >
265
- <RouteDescription >
272
+ </trias : DestinationText >
273
+ <trias : RouteDescription >
266
274
<xsl : apply-templates select =" ojp:RouteDescription" />
267
- </RouteDescription >
275
+ </trias : RouteDescription >
268
276
<xsl : if test =" ojp:Cancelled" >
269
- <Cancelled >
277
+ <trias : Cancelled >
270
278
<xsl : apply-templates select =" ojp:Cancelled" />
271
- </Cancelled >
279
+ </trias : Cancelled >
272
280
</xsl : if >
273
- </Service >
281
+ </trias : Service >
274
282
</xsl : template >
275
283
</xsl : stylesheet >
0 commit comments