SIRI Examples Catalogue

This page contains examples and descriptions of best-practice for how to structure data in the SIRI format in accordance with the Nordic SIRI Profile. The catalogue is openly available and is meant to cover the most common use cases. Suggestions for additional examples to the catalogue are welcome.

Content

Message format

All real-time datasets must be in one of the three supported formats (SIRI-ET, SIRI-SX, SIRI-VM), and sent as a single XML-file (per format) with the root node "ServiceDelivery". 

GitHub repository

The XML examples can all be found on GitHub at https://github.com/entur/profile-norway-examples/tree/master/siri

Service Delivery

Dataset

All examples are linked to XML-files in GitHub. Some examples have been more extensively described on a separate page.

SIRI-ET

EksempelXMLBeskrivelseKommentar
Vehicle before departureGitHub

Real-time data for a departure.


Partial cancellation (last leg)GitHub (before departure)
GitHub (underway)
See own document

Examples of real-time data before departure, and real-time data underway.

Partial cancellation (first leg)GitHubSee own document

Example of cancellation after departing.

Cancelled in the middle of the route before departureGitHubSee own document
Cancelled before departureGitHub

Real-time data for a cancelled departure


Replacement departure

GitHub (before departure)
GitHub (underway)


Examples of real-time data before departure, and real-time data underway.
Changed platformGitHub (before change)
GitHub (after change)
See own document

SIRI-SX

EksempelXMLBeskrivelseKommentar

Message on a Line

GitHubSee own document

Message on a leg for multiple Vehicles

GitHubSee own document

Message on a Network

GitHub

Applies to all departures (Vehicles) in a Network


Message on a Stop

GitHubSee own document

Message on a Stop for specific Lines

GitHubSee own document

Message with stopCondition on a Vehicle

GitHub (boarding/alighting)
GitHub (boarding)
GitHub (passing)
GitHub (board./alight./pass.)
See own document

Message on a Vehicle

GitHub (alternative 1)
GitHub (alternative 2)

See own document

Message on multiple Vehicles and multiple Dates

GitHubSee own document

Validity of a message

GitHub (set validity time)
GitHub (open)
GitHub (closing)
See own document

SIRI-VM

EksempelXMLBeskrivelseKommentar

Message on a Vehicle before arriving the next Stop

GitHub

A vehicle underway to monitored stop


Message on a Vehicle while serving a Stop

GitHub

A vehicle which has stopped at a monitored stop


Message with the coordinates of a Vehicle

GitHub

Minimum-example with position, but does not indicate the progress of the trip

Creating new examples

If you want to expand the samples or add new ones in GitHub, eg. the need for modelling special cases not already covered follow these guidelines. 

  1. Create a fork (your local copy) of the catalogue.
  2. Create a branch (your local branch of the code) and make your changes to the code there.
  3. Test all changes/new files.
    (XML-documents must validate against the NeTEx official Schema, see https://www.vdv.de/siri.aspx for the last version of XSD's.)
  4. Make a pull request into the repository to "save" the changes.

Further information about the use of pull request in GitHub is located at https://help.github.com/articles/using-pull-requests/.

Tools

It is recommended to use tools which support automatic validation of the data structure while working with XML files, eg.  Notepad++ with XML Tools plugin (free, the XML-plugin could be installed automatically in Notepad++ or downloaded separate) or licensed tools like Oxygen or XMLspy.