Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
hafasXMLInterface.xsd
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by rhu@hacon.de (HaCon Ingenieurges. mbH) -->
<!-- ======================================================================= -->
<!-- location validation request/result -->
<!-- connection request/result -->
<!-- connection scroll request/result -->
<!-- ======================================================================= -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="ReqC">
<xs:annotation>
<xs:documentation>The element ReqC is the root element for requests to the HAFAS system. It must contain either a location vlidation request, a connection request or a connection scroll request. (See the corresponding elements for more details).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:element ref="ConReq"/>
<xs:element ref="ConIntervalReq"/>
<xs:element ref="TimeTableInfoReq"/>
</xs:choice>
<xs:attributeGroup ref="attlist.ReqC"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.ResC">
<xs:attribute name="ver" type="xs:string" use="required" fixed="1.1">
<xs:annotation>
<xs:documentation>Current version of the Interface. The version given in the result must match the version specified in the request.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requestId" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Defines external request id for logging and tracking.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="prod" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Free form string identifying the application that produced the xml.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="lang" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Specifies the language for the request. Possible values depend on the languages contained in the actual Hafas system. Almost all versions will contain german (DE) and english (EN). The language format is defined in ISO 639-1</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="timeTableBegin" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The attribute timeTableBegin contains the date of beginning of time table period. It is set, if serviceBits are requested.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="host" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Specifies the responsing host either as IP adress or local description of the host</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="virtualServer" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The virtualServer may identicate the requested (virtual) server</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ld" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>ld is the redirector parameter, which can be for example used for load balancing purposes.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="attlist.ReqC">
<xs:attribute name="accessId" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The id may contain any string for identification of the user</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="attlist.ResC"/>
</xs:attributeGroup>
<xs:element name="Err">
<xs:annotation>
<xs:documentation>If an error occurs, the element Err indicates the type of the error and a descriptive text. This text is meant to be used for logging purposes or other internal use. Normally this message should not be presented to the user.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="attlist.Err"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Err">
<xs:attribute name="code" type="xs:token" use="required">
<xs:annotation>
<xs:documentation>The attribute code contains an identifier for the current error. This code is meant to be used by the application. A list containing possible errorcodes will be available in a separate document.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="text" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>The attribute text specifies a human readable description of the current error.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="level" default="E">
<xs:annotation>
<xs:documentation>The attribute level specifies the importance of the current error. Valid values are M for messages, W for warnings, E for errors and F for fatal errors.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="M"/>
<xs:enumeration value="W"/>
<xs:enumeration value="E"/>
<xs:enumeration value="F"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="ConBasicReq">
<xs:sequence>
<xs:element ref="Start"/>
<xs:element ref="Dest"/>
<xs:element ref="Via" minOccurs="0" maxOccurs="3"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ConReq">
<xs:annotation>
<xs:documentation>The element ConReq specifies an initial connection request (opposed to the element ConScrReq, that specifies a subsequent scroll request based on this initial request).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="ConBasicReq">
<xs:sequence>
<xs:element ref="ReqT"/>
<xs:element ref="RFlags"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="Start" type="StartViaType">
<xs:annotation>
<xs:documentation>The element Start contains the Startlocation for the current connection request. This might either be a Station, Adress or Poi, as returned by a previously obtained location validation result (LocValRes), or a userspecified coordinate (Coord) which does not require a location validation.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Via" type="ViaType">
<xs:annotation>
<xs:documentation>The Via element specifies a Station that has to be passed during the journey. There can be specified up o three Via elements in the request.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Dest" type="RequestLocationType">
<xs:annotation>
<xs:documentation>The element Dest specifies the destination of the journey. As in the Start element there can be supplied Station, and Coord elements.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ViaType">
<xs:sequence>
<xs:element ref="Station"/>
<xs:element ref="Prod"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.RequestLocationRef"/>
</xs:complexType>
<xs:complexType name="StartViaType">
<xs:complexContent>
<xs:extension base="RequestLocationType">
<xs:sequence>
<xs:element ref="Prod"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RequestLocationType">
<xs:choice>
<xs:element ref="Address"/>
<xs:element ref="Poi"/>
<xs:element ref="Station"/>
<xs:element ref="Coord"/>
</xs:choice>
<xs:attributeGroup ref="attlist.RequestLocationRef"/>
</xs:complexType>
<xs:attributeGroup name="attlist.RequestLocationRef">
<xs:attribute name="min" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The attribute min is given in minutes. For the Start and the Dest, min specifies pre- and post trip times (for example a walk time to the specified location). For the element Via, min specifies the change time (the amount of time a passenger wants to stay at the specified via, before continuing the travel). There is a maximum of 48 hours (2880 minutes) that the change time must not exceed.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Prod">
<xs:annotation>
<xs:documentation>The element Prod contains the product choice and related things. The element prod is placed within the Start ans the Via elements. The product choice defined in Prod is valid for the section of the Journey, that starts at the current location and ends at the next Via or Dest element.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="attlist.Prod"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Prod">
<xs:attribute name="prod">
<xs:annotation>
<xs:documentation>The attribute prod contains a product filter. Each means of transportation belongs to a product category. The product category of a means of transport is dependent on the data used with the current Hafas system. The concrete definements are placed in the file zugart of the Hafas raw data. There is a maximum of 16 product categories (0 - 15) in the Hafas system. The element prod contains a bitfield for these product categories. The first byte represents category 0, the second category 1, and so on. A 1 means that the category is selected for the search, a 0 means deselected. For example prod="1111000000000000" selects the categories 0 to 3 and deselects all other categories.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[01]{16}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="direct" use="optional" default="0">
<xs:annotation>
<xs:documentation>Valid values are 0 and 1. if direct is set to 1, this means, that on the current section of the journey only direct connections are allowed. A value of 0 allows changes in this section.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="sleeper" use="optional" default="0">
<xs:annotation>
<xs:documentation>If set to 1, on this section only night trains containing beds are allowed. In this case, the direct flag will be set to one implicitly. The default is 0 to allow for searches of all sorts of trains.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="couchette" use="optional" default="0">
<xs:annotation>
<xs:documentation>If set to 1, in this section only night trains containing couchettes are allowed. In this case the direct flag is set to 1 implicitly. The default is 0 to allow searches for all sorts of trains.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="bike" use="optional" default="0">
<xs:annotation>
<xs:documentation>If set o 1, only trains allowing the transport of bicycles are allowed in this section. The default is 0 to allow searches for all sorts of trains.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="ReqT" type="ReqTType">
<xs:annotation>
<xs:documentation>ReqT contains the request time for the current request.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ReqTType">
<xs:annotation>
<xs:documentation>ReqTType contains the request time for the current
request.</xs:documentation>
</xs:annotation>
<xs:attributeGroup ref="attlist.ReqT"/>
</xs:complexType>
<xs:element name="ReqIT">
<xs:annotation>
<xs:documentation>ReqInterval is a time interval (a departure time interval if a=0 or an arrival time interval if a=1). For further explanation on the limits of intervals see annotations on attribute iDuration.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="ReqTType">
<xs:attribute name="iDuration" use="required">
<xs:annotation>
<xs:documentation>ReqTimeInterval will be considered to be a time interval with a length according to iDuration in minutes. Depending on a-attribute the interval will be from (date,time) forwards to (date,time+iDuration) for a=0 (departure time interval) - or from (date,time) backwards to (date,time-iDuration) for a=1 (arrival time interval).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.ReqT">
<xs:attribute name="time" use="required">
<xs:annotation>
<xs:documentation>The attribute time contains the request time. The format is: hh:mm</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="[0-9][0-9][:][0-9][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="date" use="required">
<xs:annotation>
<xs:documentation>The attribute date contains the request date. The format is: yyyymmdd</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="[2][0-9][0-9][0-9][0-1][0-9][0-3][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="a" use="optional" default="0">
<xs:annotation>
<xs:documentation>The attribute a specifies the current request time to be an arrival time (if set to 1) or a departure time (if set to 0). Default is 0.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="RFlags">
<xs:annotation>
<xs:documentation>RFlags specifies some essential request flags passed to the Hafas kernel.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="b" use="required">
<xs:annotation>
<xs:documentation>The attribute b specifies the number of
connections to find in searchdirection backward. This
means connections starting/ending (depends on the value
of the attribute a) before the time specified in ReqT.
The number must not be below zero and must not exceed
6.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="f" use="required">
<xs:annotation>
<xs:documentation>The attribute f specifies the number of
connections to find in searchdirection forward. This
means connections starting/ending (depends on the value
of the attribute a) after the time specified in ReqT.
The number must not be below zero and must not exceed
6.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="attlist.BasicRFlags"/>
</xs:complexType>
</xs:element>
<xs:element name="RIFlags">
<xs:annotation>
<xs:documentation>RIFlags specifies some essential request flags passed to the HAFAS kernel in case of a ConIntervalReq.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="maxCons" use="optional" default="0">
<xs:annotation>
<xs:documentation>The attribute maxCons specifies the number of connections to find in case of an interval-based connection search. The number must not be below zero and must not exceed 127. Effectively this represents an additional termination criteria: the connection search will terminate either if the interval end is reached or if maxCons connections are found. Default is "0" (no termination based on number of connections found).</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="127"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="attlist.BasicRFlags"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.BasicRFlags">
<xs:attribute name="nrChanges">
<xs:annotation>
<xs:documentation>Number of changes. If this optional attribute is given, it restricts the number of changes for the current request. Possible values are from 0 (only direct connections) to 6. If the attribute is not given, the number of changes is not restricted.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="chExtension" use="optional" default="0">
<xs:annotation>
<xs:documentation>The attribute chExtension offers a percentual extension of the changetime. Valid values are from 0 (no extension) to 400 (changeTime*5). It is not possible to decrease change times.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="400"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="ResC">
<xs:annotation>
<xs:documentation>ResC is the container for any type of results, calculated by the Hafas server.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Err" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice>
<xs:element ref="ConRes"/>
<xs:element ref="TimeTableInfoRes"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="attlist.ResC"/>
</xs:complexType>
</xs:element>
<xs:element name="ConRes">
<xs:annotation>
<xs:documentation>A ConRes is the connection result. This Type of result is returned as a resonse to a connection request (ConReq) or a connection scroll request (ConScrReq).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Err" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ConnectionList" minOccurs="0" maxOccurs="2"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.ConRes"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.ConRes">
<xs:attribute name="dir" use="required">
<xs:annotation>
<xs:documentation>dir represents the direction that the result represents. O means outward connections, R means retuen connections. Currently only outward connections are calculated, so this value will be set to O.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="O"/>
<xs:enumeration value="R"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="iEndReached" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>iEndReached will be returned if the original request is a ConIntervalReq whithout a limit to the count of connections to be returned (ConIntervalReq.RIFlags.maxCons=0). iEndReached will be set to true if ConRes contains all connections for the search time interval. If iEndReached is set to false, then the client may do a subsequent ConScrReq-request until the end of the search interval is reached (indicated by iEndReached==true).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="ConnectionList">
<xs:annotation>
<xs:documentation>The ConnectionList element is the container for all connections calculated by the Hafas server.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Err" minOccurs="0"/>
<xs:element ref="Connection" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.ConnectionList"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.ConnectionList">
<xs:attribute name="type" use="optional">
<xs:annotation>
<xs:documentation>OEV public transport, IV individual transport</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="OEV"/>
<xs:enumeration value="IV"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Date" type="xs:string">
<xs:annotation>
<xs:documentation>The element date contains the base date for a connection. The base date is the date at which the conection starts. All time elements refer to the base date. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="TimeType">
<xs:sequence>
<xs:element ref="Time" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Time">
<xs:annotation>
<xs:documentation>The format of the Time element is [xxd]hh:mm:ss. xx represents a day offset. All offsets are relative to the base date of the connection. For example a time 01d12:30:00 means 12:30 at the first day following the day specified as the base date in the Date element in the Overview section of the connection.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="attlist.Time"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Time">
<xs:attribute name="delay" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>This attribute is not used at the moment.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Coord" type="LocationType">
<xs:annotation>
<xs:documentation>The Coord element represents a coordinate. In connection requests, the Coord element can be used to describe the start and the destination of a request. Coord elements can not be obtained via a LocValReq, instead the user is responsible to create valid Coord elements. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="LocationType">
<xs:attributeGroup ref="attlist.Location"/>
</xs:complexType>
<xs:attributeGroup name="attlist.Location">
<xs:attribute name="name" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The attribute name contains the output name of a location.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="x" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The x-coordinate of the location.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="y" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The y-coordinate of the location.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="z" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The z-coordinate is currently not used.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" use="optional" default="WGS84">
<xs:simpleType>
<xs:annotation>
<xs:documentation>The attribute type specifies the format of the coordinate. WGS84 is the default and the preferred format. The value of attribute is equal to WGS84 * 1000000</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="HAFAS_GEO"/>
<xs:enumeration value="HAFAS_HANNOVER"/>
<xs:enumeration value="WGS84"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="StationType">
<xs:complexContent>
<xs:extension base="LocationType">
<xs:attributeGroup ref="attlist.StationType"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Station" type="StationType">
<xs:annotation>
<xs:documentation>A station</xs:documentation>
</xs:annotation>
</xs:element>
<xs:attributeGroup name="attlist.StationType">
<xs:attribute name="externalId" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The externalId contains an identifier for the current station/Address/POI. This identifier can only be used for subsequent XML-Requests. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="externalStationNr" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The attribute externalStationNr contains the EVA-ID for the current station. This attribute will not be present for Adresses, POIs and stations found in the delfi context. If nessessary, this id can be used in subsequent HTML-based requests.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Address" type="StationType">
<xs:annotation>
<xs:documentation>An address.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Poi" type="StationType">
<xs:annotation>
<xs:documentation>A Point of Interest.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Text">
<xs:complexType mixed="true">
<xs:attributeGroup ref="attlist.Text"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Text">
<xs:attribute name="lang">
<xs:annotation>
<xs:documentation>The attribute lang specifies the language of the current text element. Possible values are data dependant(see ReqC.lang)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="DE"/>
<xs:enumeration value="DK"/>
<xs:enumeration value="EN"/>
<xs:enumeration value="FR"/>
<xs:enumeration value="PL"/>
<xs:enumeration value="IT"/>
<xs:enumeration value="MACRO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="NamedValue">
<xs:annotation>
<xs:documentation>A named value is used to specify generic extensions. The attribute name specifies the name of the element, the attribute valuetakes the corresponding value.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="attlist.NamedValue"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.NamedValue">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:attributeGroup>
<xs:element name="ServiceDays">
<xs:annotation>
<xs:documentation>The element ServiceDays specifies the days, the current connection is served. There are two representations of the servicedays. The ServiceBits take a bitfield of the servicedays. In addition there is a textual description of the servicedays, separated into regular servicedays (Mo-Fr) and irregular servicedays (not 24., 25, 26. Dez...) The textual description is given in a macro language, where all language specific parts are substituted with macros of the form $(vt&lt;xy&gt;) </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="ServiceBits" minOccurs="0"/>
<xs:element ref="RegularServiceText" minOccurs="0"/>
<xs:element ref="IrregularServiceText" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ServiceBits" type="xs:string">
<xs:annotation>
<xs:documentation>If ServiceBits are delivered you can read begin of time table from element ResC, from attribute timeTableBegin.The timetable period in days is calculated following: number of bits * 4. To calcualte on which days the transport mean is running or not take every 2 figures in ServiceBits, moving from left to right. This two figueres builds a hexadecimal digit. If you compute this 2 figures into binary description you receive 8 figured digit (built only with zeros and ones). Each figure in the digit stands for a day. The one means the transport mean is running on that day. Zero means the transport mean is not running on that day.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RegularServiceText">
<xs:complexType>
<xs:sequence>
<xs:element ref="Text" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="IrregularServiceText">
<xs:complexType>
<xs:sequence>
<xs:element ref="Text" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Connection">
<xs:annotation>
<xs:documentation>The element Connection is a container for all the data belonging to one connection.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Overview"/>
<xs:element ref="ConSectionList" minOccurs="0"/>
<xs:element ref="CommentList" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.Connection"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Connection">
<xs:attribute name="id" type="xs:ID" use="required">
<xs:annotation>
<xs:documentation>Every connection is given an identifier. This identifier is guaranteed to be unique within the complete session which means, that the connections returned for an initial ConReq and for subsequent ConScrReq requests all get a different identifier.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Duration" type="TimeType">
<xs:annotation>
<xs:documentation>The element Duration contains the duration of the current connection in the format hh:mm</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Transfers" type="xs:string">
<xs:annotation>
<xs:documentation>The element Transfers contains the number of transfers in the current connection. Walks will not be counted: Train-&gt;Walk-&gt;Train counts a one transfer. As the maximum number of conCsection within a connection is 12, the maximum number of transfers is 11. the minimum is of course 0 for direct connections</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Overview">
<xs:annotation>
<xs:documentation>The element overview takes all relevant elements to display an overview of the connection. This includes Date (the base date), Departure, Arrival, Transfers, Duration, ServiceDays and ContextURL. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Date"/>
<xs:element ref="Departure"/>
<xs:element ref="Arrival"/>
<xs:element ref="Transfers"/>
<xs:element ref="Duration"/>
<xs:element ref="ServiceDays"/>
<xs:element ref="Products"/>
<xs:element ref="ContextURL" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Products">
<xs:annotation>
<xs:documentation>The Products section shows the product categories, used in the current connection.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Product" maxOccurs="12"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Product">
<xs:complexType>
<xs:attributeGroup ref="attlist.Product"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Product">
<xs:attribute name="cat" type="xs:string" use="optional"/>
</xs:attributeGroup>
<xs:element name="ContextURL">
<xs:annotation>
<xs:documentation>The element ContextURL takes an URL that generates a more detailed view of the connection specified in the overview. If you need this element please contact us. By default, this element will not be available.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="attlist.ContextURL"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.ContextURL">
<xs:attribute name="url" type="xs:anyURI" use="required"/>
</xs:attributeGroup>
<xs:element name="ConSectionList">
<xs:annotation>
<xs:documentation>The ConSectionList is a container for the consections that form the connection. A connecton can have a maximum of 12 ConSections. Sections of type Walk and Transfer are counted as a ConSection.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="ConSection" maxOccurs="12"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ConSection">
<xs:annotation>
<xs:documentation>A ConSection consists of a Departure an Arrival and an element Journey, Walk, Transfer or GisRoute, giving more informations about the current ConSection.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Departure"/>
<xs:choice>
<xs:element ref="Journey"/>
<xs:element ref="Walk"/>
<xs:element ref="Transfer"/>
<xs:element ref="GisRoute"/>
</xs:choice>
<xs:element ref="Arrival"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Departure">
<xs:annotation>
<xs:documentation>The departure location of a ConSection</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="BasicStop"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Arrival">
<xs:annotation>
<xs:documentation>The arrival location of a ConSection</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="BasicStop"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BasicStop">
<xs:annotation>
<xs:documentation>The element BasicStop represents a Location, as a part of the current ConSection. It contains a Location (Station, Address, Poi) together with the arrival and departure times at this location, as well as some other information like platforms.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="Address"/>
<xs:element ref="Poi"/>
<xs:element ref="Station"/>
</xs:choice>
<xs:element ref="Arr" minOccurs="0"/>
<xs:element ref="Dep" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.BasicStop"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.BasicStop">
<xs:attribute name="type" default="NORMAL">
<xs:annotation>
<xs:documentation>The attribute type classifies the BasicStop either to be a normal or a virtual stop. Virtual stops can be used to display tariff borders or national boundaries, they normally do not represent physical stops, where people can leave and enter a train.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="NORMAL"/>
<xs:enumeration value="VIRTUAL"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="index" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>The attribute index specifies an index into the passlist of the current train.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Platform">
<xs:annotation>
<xs:documentation>The element Platform supplies information about the Departure- and Arrivalplatform at a Station. The maximum length of this string is 8 characters.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Text" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ArrDepType">
<xs:complexContent>
<xs:extension base="TimeType">
<xs:sequence>
<xs:element ref="Platform" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.ArrDep"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:attributeGroup name="attlist.ArrDep">
<xs:attribute name="getOut" default="YES">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="YES"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="getIn" default="YES">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="YES"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="Dep" type="ArrDepType">
<xs:annotation>
<xs:documentation>Information for the departure of a train at the current BasicStop. This includes the departure time, the departure platform and the information whether it is allowed to enter the train at the current stop or not.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Arr" type="ArrDepType">
<xs:annotation>
<xs:documentation>Information for the arrival of a train at a current stop. This includes the arrival time, the arrival platform and the information, whether it is allowed to get out of the train at the current stop.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Journey">
<xs:annotation>
<xs:documentation>The element Journey contains the List with the JourneyAttributes valid for the current ConSection, as well as (optionally) a PassList containing extended Information about the passed stations.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="JHandle"/>
<xs:element ref="JourneyAttributeList"/>
<xs:element ref="PassList"/>
<!-- Reference on new element in Journey -->
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Walk">
<xs:annotation>
<xs:documentation>A Walk is an unrouted transition with a duration of max. 15 minutes.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Duration"/>
<xs:element ref="Distance" minOccurs="0"/>
<xs:element ref="JourneyAttributeList" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="length" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>Length of the walk in meters. (linear distance)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Distance">
<xs:annotation>
<xs:documentation>Distance in meters.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Transfer">
<xs:annotation>
<xs:documentation>A Transfer is an unrouted transition with a duration of more than 15 minutes.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Duration"/>
<xs:element ref="JourneyAttributeList" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="length" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>Length of the walk in meters. (linear distance)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="GisRoute">
<xs:annotation>
<xs:documentation>A GisRoute is an externally routed consection. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Duration"/>
<xs:element ref="Distance" minOccurs="0"/>
<xs:element ref="JourneyAttributeList" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.GisRoute"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.GisRoute">
<xs:attribute name="type" use="required">
<xs:annotation>
<xs:documentation>The attribute type specifies the type of the individual traffic used. Valid values are: FOOT, BIKE, CAR, TAXI.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="PassList">
<xs:annotation>
<xs:documentation>The element PassList contains informations about the passed stops of the current ConSection. It contains a sequence of BasicStop elements</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="BasicStop" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CommentList">
<xs:annotation>
<xs:documentation>The CommentList may contain additional informations for the current connection/consection. This feature is not used in the current version of the interface. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Comment" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Comment">
<xs:complexType>
<xs:sequence>
<xs:element ref="Text" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.Comment"/>
</xs:complexType>
</xs:element>
<xs:element name="JHandle">
<xs:annotation>
<xs:documentation>A journey handle can be taken subsequent journey requests. Can be taken as is, and placed in the corresponding JourneyReq</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="tNr"/>
<xs:attribute name="puic"/>
<xs:attribute name="cycle"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Comment">
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:attributeGroup>
<xs:element name="TimeTableInfoReq">
<xs:annotation>
<xs:documentation> TimeTableInfoReq speicifies TimeTable info request. At the moment the element is empty. The result is in TimeTableInfoRes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimeTableInfoRes">
<xs:annotation>
<xs:documentation>TimeTableInfoRes specifies the answer to TimeTableInfoReq request</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Err" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="TimeTablePeriod"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TimeTablePeriod">
<xs:annotation>
<xs:documentation>TimeTableInfoPeriod specifies the period of timetable</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="begin" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Attribute begin speicifies the begin of timetable</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="end" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Attribute end specifies the end of the timetable</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Attribute">
<xs:annotation>
<xs:documentation>Attributes describe the characteristics of a ConSection, such as the name of the means of transport, the category of the means of transport, general attributes like Bord Restaurant, Reservation required and other characteristics. For a detailed description of the different attributes see the attribute type. Some types of attributes can have different attribute variants (NORMAL, SHORT and LONG), containing different Levels of information.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AttributeVariant" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.Attribute"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.Attribute">
<xs:attribute name="priority" use="optional">
<xs:annotation>
<xs:documentation>Attributes of type NORMAL do have a priority, describing the importance of the current attribute. Therange for the priority is 0 - 999. lower values have a higher priority, so 0 is the most important priority. </xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" use="optional" default="NORMAL">
<xs:annotation>
<xs:documentation>There is a variety of different attributetypes, specifying different characteristics of the current consection. Attributes of type NORMAL specify classical train attributes like BordRestaurant, Carriage of Bicycles etc. Attributes of type DIRECTION show the direction of a train, this can either be the name of the destination station or the external Id of the station, depending on the underlying data. Not all means of transportation do have a DIRECTION entry. CATEGORY specifies the the category of the train. Attributevariants of type SHORT show the internally used description of the category and has a maximum length of eight characters. Attributevariants of type NORMAL show the output category of the train and also has a maximum length of eight characters, this should be used for output. Attributevariants of type LONG take a more detailed description (like Intercity Express). Dependant on the data, the Attributevariants of type NORMAL and LONG might not be available, in which case the output of the category should be suppressed. Attributes of type INTERNALCATEGORY... Attributes of type OPERATOR contain a description of the operator of the train. Attributes of type NAME take the name of the means of transport. Please note that in some rare cases the means of transort does not have a name (for example any english trains do not have names in the data), in which case the attribute will not be printed out. Attributes ofvtype NUMBER take the external train number. </xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="NORMAL"/>
<xs:enumeration value="DIRECTION"/>
<xs:enumeration value="CATEGORY"/>
<xs:enumeration value="INTERNALCATEGORY"/>
<xs:enumeration value="OPERATOR"/>
<xs:enumeration value="NAME"/>
<xs:enumeration value="NUMBER"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="code">
<xs:annotation>
<xs:documentation>The attribute code will be available for attributes of type NORMAL and CATEGORY. For Attributes of type NORMAL it represents the internal two-byte code of the ATTRIBUTE.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="AttributeVariant">
<xs:complexType>
<xs:sequence>
<xs:element ref="Text" maxOccurs="3"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.AttributeVariant"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.AttributeVariant">
<xs:attribute name="type" use="optional" default="NORMAL">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="SHORT"/>
<xs:enumeration value="NORMAL"/>
<xs:enumeration value="LONG"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="JourneyAttributeList">
<xs:complexType>
<xs:sequence>
<xs:element ref="JourneyAttribute" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="JourneyAttribute">
<xs:annotation>
<xs:documentation>A JourneyAttribute contains an element Attribute as well as validity informations for this attribute. An attribute must not be valid for the whole ConSection and it must not be valid at all the ServiceDays of the connection. So the JourneyAttribute can take two attributes from and to, specifying an index into the PassList. Every BasicStop within a PassList has an attribute index. The Attribute is valid from the BasicStop with the index matching the index given in the attribute from, to the BasicStop with the index matching the index given in the attribute to. The element SeviceDays specifies the days were the Attribute is valid. if the element ServiceDays is not given, the attribute is valid at all the servicedays of the connection. The restriction of the ServiceDays of an Attribute is not used at the moment, but may be activated in later versions of this interface.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Attribute"/>
<xs:element ref="ServiceDays" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="attlist.JourneyAttribute"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.JourneyAttribute">
<xs:attribute name="from" type="xs:int" use="optional"/>
<xs:attribute name="to" type="xs:int" use="optional"/>
</xs:attributeGroup>
<xs:element name="ConIntervalReq">
<xs:annotation>
<xs:documentation>ConIntervalReq specifies an initiona connection interval request. You can request all connections between two locations wthin a given time interval. The result can be found in ConRes element. </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="ConBasicReq">
<xs:sequence>
<xs:element ref="ReqIT"/>
<xs:element ref="RIFlags"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.