SIRI-SX is used to model textual descriptions of disruptions, or deviations from the planned public transport information. The messages can be applied directly to stops, lines, vehicles etc. in the already existing public transport data by the use of ID references.
Structure
The root element situationExchangeDeliveryStructure
includes a response timestamp (when the XML structure was rendered), subscriptionRef
in case publish/subscribe is used for the data transfer, and exactly one Situations
element.
The tables below list which fields are supported by Samtrafiken. Any fields or attributes which are not listed are ignored.
Element | Required | Notes |
---|---|---|
Situations | Required | Contains one or more |
PtSituationElement
Element | Required | Notes |
---|---|---|
SituationNumber | Required | An internal identifier for a situation. May contain characters, but the number obtained by removing the characters should be unique for the situation |
Summaries | Required | Short summary text PtSituationElement items without any summaries are ignored. Only the first summary is read |
Descriptions | Optional | Complete text note for the message Only the first description is read |
CreationTime | Required | The time when this situation was created |
Source.ExternalCode | Optional | Code for this deviation in external systems |
Source.Other | Optional | External system id |
Source.Name | Optional | The name of the source. Currently never exported by Samtrafiken |
Progress | Required |
|
ValidityPeriod | Required | Only the first validity period is read |
ValidityPeriod.StartTime | Required | From which time the message applies |
ValidityPeriod.EndTime | Optional | At which time the message no longer applies |
UndefinedReason | Required | Reason should always be The field is mandatory due to format specification, but is not used. |
Affects > StopPlaces > AffectedStopPlace | Optional | Currently unsupported If affected stop places are set, no other type of affects should be set |
Affects > StopPoints > AffectedStopPoints | Optional | If affected stop places are set, no other type of affects should be set |
Affects > Networks > AffectedNetwork | Optional | If affected networks are set, no other type of affects should be set |
Affects > VehicleJourneys > AffectedVehicleJourney | Optional | If affected vehicle journeys are set, no other type of affects should be set |
AffectedStopPlace
Currently not implemented
AffectedStopPoint
Element | Required | Notes |
---|---|---|
StopPointRef | Required | Should reference a StopPlace or Quay in the static data. Reference to a StopPlace if all quays are affected |
AffectedNetwork
Element | Required | Notes |
---|---|---|
AffectedLines | Required | Samtrafiken does not support a complete network being affected, so lines have to be specified. One or more AffectedLine elements |
AffectedVehicleJourney
Element | Required | Notes |
---|---|---|
FramedVehicleJourneyRef > DatedVehicleJourneyRef | Required | Reference to |
FramedVehicleJourneyRef > DataFrameRef | Required | Trip start date in YYYY-MM-DD format. Used to match with static data |
VehicleJourneyRefs | Forbidden | Not supported. Messages containing one or more references will be rejected to prevent incorrect output. |
DatedVehicleJourneyRefs | Forbidden | Not supported. Messages containing one or more references will be rejected to prevent incorrect output. |
Route | Optional | Ignored by Samtrafiken - AffectedVehicleJourneys are applied to the entire vehicle journey |
AffectedLine
Element | Required | Notes |
---|---|---|
LineRef | Required | Should reference a line in the static data |
Routes > AffectedRoute | Optional | Not set if all routes are affected If set the situation only applies to the specified routes are marked as affected |
AffectedRoute
AffectedRoutes belong to AffectedLines, any filters applied here, such as only specific stops being affected, are combined with the affected line information. Only “Stop A”, in combination with “Only line 1”, will result in “Applies at stop A for traffic on line 1”.
AffectedRoutes may currently only be used to mark affected stops along a line. RouteRef shall not be used.
Element | Required | Notes |
---|---|---|
RouteRef | Forbidden | RouteRef is not implemented by Samtrafiken. Messages containing it will be rejected to prevent incorrect output. |
StopPoints | Optional | The stop points where traffic for the AffectedLine will be affected. If not set, the affectedRoute element won’t have any effect. |
StopPoints > StopPointRef | Should reference a StopPlace or Quay in the static data. Reference to a StopPlace if all quays are affected. |
Examples
Stop no longer trafficked from a certain day, applied to the stop on specific lines
<situationExchangeDeliveryStructure xmlns:ns5="http://www.siri.org.uk/siri" xmlns:ns2="http://www.ifopt.org.uk/acsb" xmlns:ns4="http://datex2.eu/schema/2_0RC1/2_0" xmlns:ns3="http://www.ifopt.org.uk/ifopt"> <ns5:ResponseTimestamp>2024-10-14T15:18:23.917+02:00</ns5:ResponseTimestamp> <ns5:SubscriberRef>Samtrafiken</ns5:SubscriberRef> <!-- as specified by Samtrafiken when the subscription is created, not required when publish/subscribe is not used for data transfer --> <ns5:SubscriptionRef>situation_exchange-1728919101</ns5:SubscriptionRef> <!-- as specified by Samtrafiken when the subscription is created, not required when publish/subscribe is not used for data transfer --> <ns5:Situations> <ns5:PtSituationElement> <ns5:CreationTime>2024-10-07T13:57:38.53+02:00</ns5:CreationTime> <ns5:ParticipantRef>OrganisationName</ns5:ParticipantRef> <ns5:SituationNumber>TX1234567</ns5:SituationNumber> <ns5:Source> <ns5:Other>RT1234567</ns5:Other> <ns5:Name>ORG\USER</ns5:Name> <ns5:ExternalCode>RT1234567-TX1234567</ns5:ExternalCode> </ns5:Source> <ns5:Progress>open</ns5:Progress> <ns5:ValidityPeriod> <ns5:StartTime>2024-10-07T13:57:00+02:00</ns5:StartTime> </ns5:ValidityPeriod> <UndefinedReason/> <ns5:Summary>Hållplats Västra Saltvik</ns5:Summary> <ns5:Description>Hållplats Västra Saltvik i Härnösand är färdigbyggd och trafikeras från och med 7 oktober av linje 501, 532 och 534. Med anledning av detta trafikeras hållplats Hamnleden fortsättningsvis endast i riktning från stan.</ns5:Description> <ns5:Affects> <ns5:Networks> <ns5:AffectedNetwork> <ns5:AffectedLine> <ns5:LineRef>SE:022:Line:9011022050100000</ns5:LineRef> </ns5:AffectedLine> </ns5:AffectedNetwork> <ns5:AffectedNetwork> <ns5:AffectedLine> <ns5:LineRef>SE:022:Line:9011022053200000</ns5:LineRef> <ns5:Routes> <ns5:AffectedRoute> <ns5:StopPoints> <ns5:AffectedOnly>true</ns5:AffectedOnly> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022000898005</ns5:StopPointRef> </ns5:AffectedStopPoint> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022001948002</ns5:StopPointRef> </ns5:AffectedStopPoint> <!-- more stoppoints --> </ns5:StopPoints> </ns5:AffectedRoute> </ns5:Routes> </ns5:AffectedLine> </ns5:AffectedNetwork> <ns5:AffectedNetwork> <ns5:AffectedLine> <ns5:LineRef>SE:022:Line:9011022053400000</ns5:LineRef> <ns5:Routes> <ns5:AffectedRoute> <ns5:StopPoints> <ns5:AffectedOnly>true</ns5:AffectedOnly> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022000898004</ns5:StopPointRef> </ns5:AffectedStopPoint> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022001948002</ns5:StopPointRef> </ns5:AffectedStopPoint> <!-- more points --> </ns5:StopPoints> </ns5:AffectedRoute> </ns5:Routes> </ns5:AffectedLine> </ns5:AffectedNetwork> </ns5:Networks> <ns5:StopPoints> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022080290001</ns5:StopPointRef> </ns5:AffectedStopPoint> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022080290002</ns5:StopPointRef> </ns5:AffectedStopPoint> </ns5:StopPoints> </ns5:Affects> </ns5:PtSituationElement> </ns5:Situations> </situationExchangeDeliveryStructure>
Stop no longer trafficked from a certain day, applied to a complete vehicle journey
<situationExchangeDeliveryStructure xmlns:ns5="http://www.siri.org.uk/siri" xmlns:ns2="http://www.ifopt.org.uk/acsb" xmlns:ns4="http://datex2.eu/schema/2_0RC1/2_0" xmlns:ns3="http://www.ifopt.org.uk/ifopt"> <ns5:ResponseTimestamp>2024-10-14T15:18:23.917+02:00</ns5:ResponseTimestamp> <ns5:SubscriberRef>Samtrafiken</ns5:SubscriberRef> <!-- as specified by Samtrafiken when the subscription is created, not required when publish/subscribe is not used for data transfer --> <ns5:SubscriptionRef>situation_exchange-1728919101</ns5:SubscriptionRef> <!-- as specified by Samtrafiken when the subscription is created, not required when publish/subscribe is not used for data transfer --> <ns5:Situations> <ns5:PtSituationElement> <ns5:CreationTime>2024-10-07T13:57:38.53+02:00</ns5:CreationTime> <ns5:ParticipantRef>OrganisationName</ns5:ParticipantRef> <ns5:SituationNumber>TX1234567</ns5:SituationNumber> <ns5:Source> <ns5:Other>RT1234567</ns5:Other> <ns5:Name>ORG\USER</ns5:Name> <ns5:ExternalCode>RT1234567-TX1234567</ns5:ExternalCode> </ns5:Source> <ns5:Progress>open</ns5:Progress> <ns5:ValidityPeriod> <ns5:StartTime>2024-10-07T13:57:00+02:00</ns5:StartTime> </ns5:ValidityPeriod> <UndefinedReason/> <ns5:Summary>Hållplats Västra Saltvik</ns5:Summary> <ns5:Description>Hållplats Västra Saltvik i Härnösand är färdigbyggd och trafikeras från och med 7 oktober av linje 501, 532 och 534. Med anledning av detta trafikeras hållplats Hamnleden fortsättningsvis endast i riktning från stan.</ns5:Description> <ns5:Affects> <ns5:VehicleJourneys> <ns5:AffectedVehicleJourney> <ns5:FramedVehicleJourneyRef> <ns5:DataFrameRef>2024-10-02</ns5:DataFrameRef> <ns5:DatedVehicleJourneyRef>SE:022:ServiceJourney:000500555003</ns5:DatedVehicleJourneyRef> </ns5:FramedVehicleJourneyRef> <ns5:Route> <!-- currently ignored by Samtrafiken --> <ns5:StopPoints> <ns5:AffectedStopPoint> <ns5:StopPointRef>SE:022:Quay:9022022000001001</ns5:StopPointRef> </ns5:AffectedStopPoint> </ns5:StopPoints> </ns5:Route> </ns5:AffectedVehicleJourney> </ns5:VehicleJourneys> </ns5:Affects> </ns5:PtSituationElement> </ns5:Situations> </situationExchangeDeliveryStructure>