Skip to content

Structure & Compatibility

Eliot edited this page Oct 6, 2023 · 13 revisions

SIRI Schema Structure

The SIRI XML schema adopts a modularized approach, with each module aligning with a specific component or package defined in the SIRI specification. These schema files are structured within directories that reflect the components and packages within the SIRI design model.

Advantages of a Modular Schema

A modular schema design offers several advantages within the context of SIRI:

  • Selective Usage: Users can selectively incorporate only the required elements from the schema, providing flexibility and efficiency for specific application needs.

  • Isolation of Changes: When updates or changes are necessary, they can be confined to the relevant schema components, minimizing the impact on the entire system.

  • Recommended XML Editors: To effectively navigate and edit the schema, it is strongly recommended to use specialized XML editors such as XmlSpy or Oxygen. These editors enhance the development experience and ensure compliance with the SIRI schema.


Folders

For each SIRI-XML release the top level directory contains:

\schema\1.00\ReadMe.md  
\schema\1.00\Releases-notes    
\schema\1.00\Siri-spp    [Altova XmlSpy PROJECT]
\schema\1.00\Siri-xpr    [Oxygen PROJECT]
\schema\1.00\.travis.yml 
\schema\1.00\xsd                [XSD schemas]

	\schema\1.00\xsd\siri.xsd
	\schema\1.00\xsd\siriSg.xsd
	\schema\1.00\xsd\siri_all_functionalServices.xsd
	\schema\1.00\xsd\siri_connectionMonitoring_service.xsd
	\schema\1.00\xsd\siri_connectionTimetable_service.xsd
        \schema\1.00\xsd\siri_discovery.xsd
        \schema\1.00\xsd\siri_estimatedTimetable_service.xsd
        \schema\1.00\xsd\siri_facilityMonitoring_service.xsd
        \schema\1.00\xsd\siri_generalMessage_service.xsd
        \schema\1.00\xsd\siri_situationExchange_service.xsd
        \schema\1.00\xsd\siri_stopMonitoring_service.xsd
        \schema\1.00\xsd\siri_stopTimetable_service.xsd
        \schema\1.00\xsd\siri_vehicleMonitoring_service.xsd
        \schema\1.00\xsd\siri_wsConsumer-Document.wsdl
        \schema\1.00\xsd\siri_wsConsumer-WSDL2.wsdl
        \schema\1.00\xsd\siri_wsConsumer.wsdl
        \schema\1.00\xsd\siri_wsProducer-Document.wsdl
        \schema\1.00\xsd\siri_wsProducer-WSDL2.wsdl
        \schema\1.00\xsd\siri_wsProducer.wsdl

	\schema\1.00\xsd\acsb\...
	\schema\1.00\xsd\datex2\... (Common Framework elements)
	\schema\1.00\xsd\gml\...
	\schema\1.00\xsd\ifotp\... (Timetable Model)
	\schema\1.00\xsd\siri\... (Fares Model)
        \schema\1.00\xsd\siri_model\... (New modes)
	\schema\1.00\xsd\siri_model_discovery\...
	\schema\1.00\xsd\siri_utility\...
	\schema\1.00\xsd\wsdl_model\...
	\schema\1.00\xsd\xml\...

\schema\1.00\examples\... [Example  xml documents]
        \schema\1.00\examples\siri_exa_framework\...
        \schema\1.00\examples\siri_exm_CM\...
        \schema\1.00\examples\siri_exm_CT\... 
        \schema\1.00\examples\siri_exm_ET\...  
        \schema\1.00\examples\siri_exm_FM\...  
        \schema\1.00\examples\siri_exm_GM\...  
        \schema\1.00\examples\siri_exm_PT\...  
        \schema\1.00\examples\siri_exm_SM\...  
        \schema\1.00\examples\siri_exm_ST\...  
        \schema\1.00\examples\siri_exm_SX\...  
        \schema\1.00\examples\siri_exu_capability\...
        \schema\1.00\examples\siri_exu_discovery\...   
       
\schema\1.00\.travis\... [xmllint-check script]
        \schema\1.00\.travis\travis-ci_git-commit.sh
        \schema\1.00\.travis\xmllint-check.sh

Referencing SIRI Schema in the SIRI XML documents

An SIRI XML document contains data marked up with XML tags that conform to a given version of the SIRI schema.

The schema to use to validate the document is given by the xsi:schemaLocation attribute in the document header. For example, siri.xsd in the following excerpt.

<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2005-2012 CEN SIRI -->
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">
 <ServiceDelivery>
  <!--=======HEADER================================================== -->
  <ResponseTimestamp>2004-12-17T09:30:46-05:00</ResponseTimestamp>
  <ProducerRef>KUBRICK</ProducerRef>
  <Status>true</Status>
  <MoreData>false</MoreData>
  <!--=======PAYLOAD============================================== -->
  <ConnectionMonitoringFeederDelivery version="2.0">
  :::: contents
  </ConnectionMonitoringFeederDelivery>
 </ServiceDelivery>
</Siri>

Clone this wiki locally