Skip to content

Commit 0310f4a

Browse files
Use full trias namespace
1 parent 63d17f2 commit 0310f4a

File tree

2 files changed

+125
-117
lines changed

2 files changed

+125
-117
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
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">
26
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
37

48
<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">
614
<xsl:apply-templates select="ojp:OJPResponse"/>
7-
</Trias>
15+
</trias:Trias>
816
</xsl:template>
917
<!--*********************************************-->
1018
<xsl:template match="ojp:OJPResponse">
@@ -13,7 +21,7 @@
1321
<!--*********************************************-->
1422

1523
<xsl:template match="siri:ServiceDelivery">
16-
<ServiceDelivery>
24+
<trias:ServiceDelivery>
1725
<siri:ResponseTimestamp>
1826
<xsl:value-of select="//siri:ResponseTimestamp[1]"/>
1927
</siri:ResponseTimestamp>
@@ -24,17 +32,17 @@
2432
<xsl:apply-templates select="ojp:OJPStopEventDelivery"/>
2533
<xsl:apply-templates select="siri:ErrorCondition"/>
2634

27-
</ServiceDelivery>
35+
</trias:ServiceDelivery>
2836
</xsl:template>
2937
<!--*********************************************-->
3038

3139
<xsl:template match="ojp:OJPStopEventDelivery">
32-
<DeliveryPayload>
33-
<StopEventResponse>
40+
<trias:DeliveryPayload>
41+
<trias:StopEventResponse>
3442
<xsl:apply-templates select="ojp:StopEventResponseContext"/>
3543
<xsl:apply-templates select="ojp:StopEventResult"/>
36-
</StopEventResponse>
37-
</DeliveryPayload>
44+
</trias:StopEventResponse>
45+
</trias:DeliveryPayload>
3846
</xsl:template>
3947

4048
<!--*********************************************-->
@@ -48,228 +56,228 @@
4856

4957
<!--*********************************************-->
5058
<xsl:template match="ojp:StopEventResponseContext">
51-
<StopEventResponseContext>
59+
<trias:StopEventResponseContext>
5260
<xsl:apply-templates select="ojp:Places"/>
53-
</StopEventResponseContext>
61+
</trias:StopEventResponseContext>
5462
</xsl:template>
5563
<xsl:template match="ojp:Places">
56-
<Locations>
64+
<trias:Locations>
5765
<xsl:apply-templates select="ojp:Place"/>
58-
</Locations>
66+
</trias:Locations>
5967
</xsl:template>
6068
<!--*********************************************-->
6169
<xsl:template match="ojp:StopEventResult">
62-
<StopEventResult>
63-
<ResultId>
70+
<trias:StopEventResult>
71+
<trias:ResultId>
6472
<xsl:value-of select="ojp:Id"/>
65-
</ResultId>
73+
</trias:ResultId>
6674
<xsl:apply-templates select="ojp:StopEvent"/>
67-
</StopEventResult>
75+
</trias:StopEventResult>
6876
</xsl:template>
6977
<!--*********************************************-->
7078
<xsl:template match="ojp:Place">
71-
<Location>
79+
<trias:Location>
7280
<xsl:apply-templates select="ojp:StopPlace"/>
7381
<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>
7785
<xsl:apply-templates select="ojp:GeoPosition"/>
78-
</Location>
86+
</trias:Location>
7987
<!--*********************************************-->
8088
</xsl:template>
8189
<xsl:template match="ojp:GeoPosition">
82-
<GeoPosition>
83-
<Longitude>
90+
<trias:GeoPosition>
91+
<trias:Longitude>
8492
<xsl:value-of select="siri:Longitude"/>
85-
</Longitude>
86-
<Latitude>
93+
</trias:Longitude>
94+
<trias:Latitude>
8795
<xsl:value-of select="siri:Latitude"/>
88-
</Latitude>
89-
</GeoPosition>
96+
</trias:Latitude>
97+
</trias:GeoPosition>
9098
</xsl:template>
9199
<!--*********************************************-->
92100
<xsl:template match="ojp:StopPlace">
93-
<StopPlace>
94-
<StopPlaceRef>
101+
<trias:StopPlace>
102+
<trias:StopPlaceRef>
95103
<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>
100108

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>
105113
<!--<xsl:if test="ojp:TopographicPlaceRef">
106114
<TopographicPlaceRef><xsl:value-of select="ojp:TopographicPlaceRef"/></TopographicPlaceRef></xsl:if>-->
107-
</StopPlace>
115+
</trias:StopPlace>
108116
</xsl:template>
109117
<!--*********************************************-->
110118
<xsl:template match="ojp:StopPoint">
111-
<StopPoint>
112-
<StopPointRef>
119+
<trias:StopPoint>
120+
<trias:StopPointRef>
113121
<xsl:value-of select="siri:StopPointRef"/>
114-
</StopPointRef>
115-
<StopPointName>
122+
</trias:StopPointRef>
123+
<trias:StopPointName>
116124
<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>
121129
<Value><xsl:value-of select="ojp:PrivateCode/ojp:Value"/></Value>
122-
</PrivateCode>
130+
</trias:PrivateCode>
123131
<!-- <xsl:if test="ojp:TopographicPlaceRef">
124132
<TopographicPlaceRef><xsl:value-of select="ojp:TopographicPlaceRef"/></TopographicPlaceRef></xsl:if> -->
125-
</StopPoint>
133+
</trias:StopPoint>
126134
</xsl:template>
127135
<!--*********************************************-->
128136
<xsl:template match="ojp:CallAtStop">
129-
<CallAtStop>
130-
<StopPointRef>
137+
<trias:CallAtStop>
138+
<trias:StopPointRef>
131139
<xsl:value-of select="siri:StopPointRef"/>
132-
</StopPointRef>
133-
<StopPointName>
140+
</trias:StopPointRef>
141+
<trias:StopPointName>
134142
<xsl:apply-templates select="ojp:StopPointName"/>
135-
</StopPointName>
136-
<PlannedBay>
143+
</trias:StopPointName>
144+
<trias:PlannedBay>
137145
<xsl:apply-templates select="ojp:PlannedQuay"/>
138-
</PlannedBay>
146+
</trias:PlannedBay>
139147
<xsl:if test="ojp:EstimatedQuay">
140-
<EstimatedBay>
148+
<trias:EstimatedBay>
141149
<Text><xsl:value-of select="ojp:EstimatedQuay/ojp:Text"/></Text>
142-
</EstimatedBay>
150+
</trias:EstimatedBay>
143151
</xsl:if>
144152
<xsl:apply-templates select="ojp:ServiceArrival"/>
145153
<xsl:apply-templates select="ojp:ServiceDeparture"/>
146154
<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>
148156
</xsl:if>
149157
<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>
151159
</xsl:if>
152160
<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>
154162
</xsl:if>
155163
<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>
157165
</xsl:if>
158166
<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>
160168
</xsl:if>
161169
<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>
163171
</xsl:if>
164-
</CallAtStop>
172+
</trias:CallAtStop>
165173
</xsl:template>
166174
<!--*********************************************-->
167175
<xsl:template match="ojp:ServiceArrival">
168-
<ServiceArrival>
176+
<trias:ServiceArrival>
169177
<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>
171179
</xsl:if>
172180
<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>
174182
</xsl:if>
175-
</ServiceArrival>
183+
</trias:ServiceArrival>
176184

177185
</xsl:template>
178186
<!--*********************************************-->
179187
<xsl:template match="ojp:ServiceDeparture">
180-
<ServiceDeparture>
188+
<trias:ServiceDeparture>
181189
<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>
183191
</xsl:if>
184192
<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>
186194
</xsl:if>
187-
</ServiceDeparture>
195+
</trias:ServiceDeparture>
188196

189197
</xsl:template>
190198
<!--*********************************************-->
191199
<xsl:template match="ojp:StopEvent">
192-
<StopEvent>
200+
<trias:StopEvent>
193201
<xsl:apply-templates select="ojp:PreviousCall"/>
194202
<xsl:apply-templates select="ojp:ThisCall"/>
195203
<xsl:apply-templates select="ojp:OnwardCall"/>
196204
<xsl:apply-templates select="ojp:Service"/>
197-
<Extension>
205+
<trias:Extension>
198206
<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>
200208
</xsl:if>
201209
<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>
203211
</xsl:if>
204-
</Extension>
205-
</StopEvent>
212+
</trias:Extension>
213+
</trias:StopEvent>
206214
</xsl:template>
207215
<!--*********************************************-->
208216
<xsl:template match="ojp:ThisCall">
209-
<ThisCall>
217+
<trias:ThisCall>
210218
<xsl:apply-templates select="ojp:CallAtStop"/>
211219
<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>
213221
</xsl:if>
214222
<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>
216224
</xsl:if>
217-
</ThisCall>
225+
</trias:ThisCall>
218226
</xsl:template>
219227
<!--*********************************************-->
220228
<xsl:template match="ojp:PreviousCall">
221-
<PreviousCall>
229+
<trias:PreviousCall>
222230
<xsl:apply-templates select="ojp:CallAtStop"/>
223-
</PreviousCall>
231+
</trias:PreviousCall>
224232
</xsl:template>
225233
<!--*********************************************-->
226234
<xsl:template match="ojp:OnwardCall">
227-
<OnwardCall>
235+
<trias:OnwardCall>
228236
<xsl:apply-templates select="ojp:CallAtStop"/>
229-
</OnwardCall>
237+
</trias:OnwardCall>
230238
</xsl:template>
231239
<!--*********************************************-->
232240
<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>
235243
</xsl:template>
236244
<!--*********************************************-->
237245
<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>
246254
<!-- 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>
254262
<xsl:value-of select="ojp:OriginStopPointRef"/>
255-
</OriginStopPointRef>
256-
<OriginText>
263+
</trias:OriginStopPointRef>
264+
<trias:OriginText>
257265
<xsl:apply-templates select="ojp:OriginText"/>
258-
</OriginText>
259-
<DestinationStopPointRef>
266+
</trias:OriginText>
267+
<trias:DestinationStopPointRef>
260268
<xsl:value-of select="ojp:DestinationStopPointRef"/>
261-
</DestinationStopPointRef>
262-
<DestinationText>
269+
</trias:DestinationStopPointRef>
270+
<trias:DestinationText>
263271
<xsl:apply-templates select="ojp:DestinationText"/>
264-
</DestinationText>
265-
<RouteDescription>
272+
</trias:DestinationText>
273+
<trias:RouteDescription>
266274
<xsl:apply-templates select="ojp:RouteDescription"/>
267-
</RouteDescription>
275+
</trias:RouteDescription>
268276
<xsl:if test="ojp:Cancelled">
269-
<Cancelled>
277+
<trias:Cancelled>
270278
<xsl:apply-templates select="ojp:Cancelled"/>
271-
</Cancelled>
279+
</trias:Cancelled>
272280
</xsl:if>
273-
</Service>
281+
</trias:Service>
274282
</xsl:template>
275283
</xsl:stylesheet>

application/src/main/java/org/opentripplanner/standalone/server/GrizzlyServer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void run() {
9090
CompressionConfig cc = httpListener.getCompressionConfig();
9191
cc.setCompressionMode(CompressionConfig.CompressionMode.ON);
9292
cc.setCompressionMinSize(50000); // the min number of bytes to compress
93-
cc.setCompressableMimeTypes("application/json", "text/json", MediaType.APPLICATION_XML); // the mime types to compress
93+
cc.setCompressibleMimeTypes("application/json", "text/json", MediaType.APPLICATION_XML); // the mime types to compress
9494
httpListener.getTransport().setWorkerThreadPoolConfig(threadPoolConfig);
9595
httpListener.setTransactionTimeout((int) httpTransactionTimeout.toSeconds());
9696
httpServer.addListener(httpListener);

0 commit comments

Comments
 (0)