Skip to content

Software & Tools

Eliot edited this page Nov 3, 2023 · 8 revisions

Data production & quality 📊

Validators

Tool Name Description Profile URL
BODS Validator of TransXChange and SIRI-VM https://github.com/department-for-transport-BODS/bods

Mapping & conversion 🛠️

Conversion and connectors to SIRI software and between other formats

Tool Name Description Profile URL
Anshar Java based tool to connect, validate and redistribute SIRI. (Act as a national aggreagation hub for all SIRI feeds in Norway) Norwegian https://github.com/entur/anshar
OneBusAway SIRI Libraries and tools for working with real-time public transit data in the SIRI format https://github.com/OneBusAway/onebusaway-siri
Irys A set of tools to connect and redistribute SIRI https://github.com/afimb/irys

Canonical mapping

Developed through collaboration between the EU-funded DATA4PT project and MobilityData experts, it is the canonical mapping between GBFS v2.2 and NeTEx/SIRI Part 5 (New modes extensions).

It is mostly designed for any developers looking to integrate any new modes in a mobility offer that already has conventional modes described using NeTEx./SIRI. It is available here.

Formatting of code

Xmllint

Xmllint is a tool that helps harmonize XML, XSD, and WSDL files before integrating them into your project. To achieve this, you can use the following shell script:

#!/bin/bash
/usr/bin/find . -name "*.xsd" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

/usr/bin/find . -name "*.xml" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

/usr/bin/find . -name "*.wsdl" -type f | while read i; do
  XMLLINT_INDENT=" " xmllint --pretty 1 "$i" > "$i.pretty"
  mv "$i.pretty" "$i"
done

echo "Finished formatting"

You can execute the script with bash xmllint-check.sh. If you are on a Windows machine, you can use it via Cygwin (see installation instructions).

Resources

TravisCI

The formatting with Xmllint as shown above does not need to be done by the contributors. Changes to the SIRI-CEN repo are automatically corrected (or reformatted respectively) by TravisCI. If contributors still want to utilize Xmllint or want to check/validate the changes themselves, they can use the xmllint-check script provided in the /.travis subfolder.

XML editors

An XML Editor is a software tool that reads and validates XML data files, providing a Graphical User Interface (GUI) to visualize and edit XML schemas and documents.

These tools serve two main purposes:

  • Schema Definition: They allow the definition of W3C schemas and Data Type Definitions (DTDs) to specify XML data structures for specific problem domains, such as public transport. W3C schema files typically end in .xsd, for example, netex_publication.xsd.

  • Document Validation: They help create and validate XML documents according to a given XML schema. XML instance document filenames usually end in .xml, like myStops.xml.

XML editors are especially valuable when working with large data models like NeTEx, which require careful modularization for flexibility and maximum reuse. To effectively manage such schemas, a set of documents often needs to be assembled and interpreted as a whole. We strongly recommend using an XML editor to browse or work with XML schemas.

Some XML editors

Numerous XML editors are available, including commercial products like XmlSpy and Oxygen, as well as open-source options. You can find a comparison of XML editors at Comparison_of_XML_editors.