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
- 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 | GitHub | 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) | GitHub | See own document | Example of cancellation after departing. |
Cancelled in the middle of the route before departure | GitHub | See own document | |
Cancelled before departure | GitHub | Real-time data for a cancelled departure | |
Replacement departure | Examples of real-time data before departure, and real-time data underway. | ||
Changed platform | GitHub (before change) GitHub (after change) | See own document |
SIRI-SX
Eksempel | XML | Beskrivelse | Kommentar |
---|---|---|---|
Message on a Line | GitHub | See own document | |
Message on a leg for multiple Vehicles | GitHub | See own document | |
Message on a Network | GitHub | Applies to all departures (Vehicles) in a Network | |
Message on a Stop | GitHub | See own document | |
Message on a Stop for specific Lines | GitHub | See 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 | See own document | ||
Message on multiple Vehicles and multiple Dates | GitHub | See own document | |
Validity of a message | GitHub (set validity time) GitHub (open) GitHub (closing) | See own document |
SIRI-VM
Eksempel | XML | Beskrivelse | Kommentar |
---|---|---|---|
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.
- 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.