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
- 1 Content
- 2 Message format
- 2.1 GitHub repository
- 2.2 Service Delivery
- 2.3 Dataset
- 2.4 Creating new examples
- 2.4.1 Tools
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
Skeleton (can be used as a starting point to generate the XML data)
Complete dataset (contains all relevant elements for a complete dataset)
[Not yet available]
Dataset
All examples are linked to XML-files in GitHub. Some examples have been more extensively described on a separate page.
SIRI-ET
Eksempel | XML | Beskrivelse | Kommentar |
|---|---|---|---|
Vehicle before departure | Real-time data for a departure. |
| |
Partial cancellation (last leg) | Examples of real-time data before departure, and real-time data underway. | ||
Partial cancellation (first leg) | Example of cancellation after departing. | ||
Cancelled in the middle of the route before departure |
| ||
Cancelled before departure | Real-time data for a cancelled departure |
| |
Replacement departure |
| Examples of real-time data before departure, and real-time data underway. | |
Changed platform |
|
SIRI-SX
Eksempel | XML | Beskrivelse | Kommentar |
|---|---|---|---|
Message on a Line |
| ||
Message on a leg for multiple Vehicles |
| ||
Message on a Network | Applies to all departures (Vehicles) in a Network |
| |
Message on a Stop |
| ||
Message on a Stop for specific Lines |
| ||
Message with stopCondition on a Vehicle | GitHub (boarding/alighting) |
| |
Message on a Vehicle |
| ||
Message on multiple Vehicles and multiple Dates |
| ||
Validity of a message |
|
SIRI-VM
Eksempel | XML | Beskrivelse | Kommentar |
|---|---|---|---|
Message on a Vehicle before arriving the next Stop | A vehicle underway to monitored stop |
| |
Message on a Vehicle while serving a Stop | A vehicle which has stopped at a monitored stop |
| |
Message with the coordinates of a Vehicle |
| 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.
Create a fork (your local copy) of the catalogue.
Create a branch (your local branch of the code) and make your changes to the code there.
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.)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.