<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by nick knowles (kizoom) -->
<xsd:schema targetNamespace="http://www.journeyweb.org.uk/schemas/" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0b" id="JourneyWeb" xmlns="http://www.journeyweb.org.uk/schemas/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:annotation>
		<xsd:appinfo xmlns:gms="http://www.govtalk.gov.uk/CM/gms">
			<Metadata xmlns="http://www.govtalk.gov.uk/CM/gms-xs">
				<Aggregation>main schema</Aggregation>
				<Audience>e-service developers</Audience>
				<Contributor>Revised for version 3.0b Kizoom Limited, by Adam Cohen Rose, Nicholas Knowles. [mailto:schemer@kizoom.com]</Contributor>
				<Contributor>Specialist advice for version 3.0b. Matthew Frances, Action Information Management systems. [mailto:mfrancis@aimltd.co.uk]</Contributor>
				<Contributor>Overall direction and Advice from Roger Slevin [Roger.Slevin@dft.gsi.gov.uk]</Contributor>
				<Coverage>United Kingdom</Coverage>
				<Creator>Created as W3C .xsd schema by Atkins Global as 2.1 XML schema,  Richard Shaw, Mike Ness.  mailto:richard.shaw@atkinsglobal.com</Creator>
				<Date>
					<Created>2003-05-20</Created>
				</Date>
				<Date>
					<Modified>2003-07-30</Modified>
				</Date>
				<Date>
					<Modified>2003-12-03</Modified>
				</Date>
				<Date>
					<Modified>2003-09-15</Modified>
				</Date>
				<Description>
					<p>JourneyWeb is an XML protocol to allow remote journey planning engines to communicate in order to provide multimodal journeys spanning different regions.
The protocol is a UK national de facto standard sponsored by the UK Department of Transport and is being used in the Transport Direct Portal project to provide contiguous distributed journey planning for the whole of the UK.  It builds on two other standards NaPTAN and the NPTG gazetteer.</p>
					<p>JourneyWeb allows two or more journey planning engines with knowledge of different areas or transport modes to carry out distributed journey planning, that is to dynamically query data from both servers and use the results to build up composite journeys that span the respective areas covered by the respective engines.</p>
					<p>JourneyWeb is a request response protocol with messages to query the following:</p>
					<ul>
						<li>POINTS: The remote stops for a NPTG locality or coordinate.</li>
						<li>JOURNEYS:  Journeys between combinations of stops.</li>
						<li>LEG DETAILS:  Further Details about journey legs.</li>
						<li>SERVICES:  The services covered by a remote timetable.</li>
						<li>OPERATORS: The operators supported by the remote journey planner.</li>
						<li>TIMETABLES:  A matrix of timetable data for remote services, suitable for producing columnar timetables.</li>
						<li>STOPEVENTS:  Departures for a stop at a specified time.</li>
					</ul>
					<p>JourneyWeb results may optionally include map plotting data, disabled access information. </p>
				</Description>
				<Format>
					<MediaType>text/xml</MediaType>
					<Syntax>http://www.w3.org/2001/XMLSchema</Syntax>
					<Description>XML schema, W3C Recommendation 2001</Description>
				</Format>
				<Identifier>http://www.journeyweb.org.uk/schemas/3.0a/{JourneyWeb.xsd}</Identifier>
				<Language>[ISO 639-2/B] ENG</Language>
				<Publisher>Department for Transport, Great Minster House, 76 Marsham Street, London SW1P 4DR</Publisher>
				<Relation>
					<Requires>http://www.journeyweb.org.uk/schemas/3.0/ErrorHandling.xsd</Requires>
				</Relation>
				<Relation>
					<HasPart>ErrorHandling</HasPart>
				</Relation>
				<Rights>Unclassified
                               <Copyright>Crown Copyright 2000-2004.</Copyright>
				</Rights>
				<Source>
					<ul>
						<li>JourneyWeb concept Originally developed in 1997 by G. P. Fingerle as part of his PhD thesis (final publication in July, 2001).</li>
						<li> Revised as Version 1.1  Nov 10 2000 by A. C. Lock and G. P. Fingerle.</li>
						<li>Revised as Version 1.1.1  December 12, 2001 by G. P. Fingerle.</li>
						<li> Revised as Version 2.0 schema   December 12, 2002 by Richard Shaw, Mike Ness WS Atkins.</li>
						<li> Revised as Version 2.1 schema   May 20, 2002 by Richard Shaw, Mike Ness WS Atkins.</li>
					</ul>
				</Source>
				<Status> Version 3.0b Draft for approval </Status>
				<Subject>
					<Category> Arts, recreation and travel, Tourism, Travel (tourism), Transport,
Air transport,  Aircraft (civilian), Airports,  Aviation,
Ports and maritime transport, Ferries (marine), Maritime transport, Sea transport, Water transport (sea-going)
Public transport, Bus services, Coach services, Bus stops and stations
Rail transport, Infrastructure (railways), Railway stations and track, Train services, Underground trains
Roads and road transport, Car parks, Cars (road vehicles), Cycling (transport), Highways,  Infrastructure (roads), Minicabs, Motorcycles,
Parking, Pavements, Road signs,  Taxis,  Vehicles (road use), Walking (as transport),
Access for disabled people, Mobility for the disabled
                               </Category>
					<Project>Transport Direct</Project>
				</Subject>
				<Title>JourneyWeb, an XML protocol for distributed journey planning.</Title>
				<Type>Standard</Type>
			</Metadata>
		</xsd:appinfo>
		<xsd:documentation>JourneyWeb, an XML protocol for distributed journey planning.</xsd:documentation>
	</xsd:annotation>
	<!--Modules used-->
	<xsd:include schemaLocation="JourneyWeb_errors.xsd"/>
	<xsd:include schemaLocation="JourneyWeb_types.xsd"/>
	<xsd:element name="JourneyWeb">
		<xsd:annotation>
			<xsd:documentation>@SchemaVersion
Only responses valid for the requested version of the schema will be returned.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="Request">
					<xsd:annotation>
						<xsd:documentation>@Language (optional) ISO639 value.
@SuppressNames (optional).
Contains one or more specific requests. </xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="PointsRequest" type="PointsRequestStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request the points for a remote locality or X,Y.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="JourneysRequest" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request a journey between A and B.</xsd:documentation>
								</xsd:annotation>
								<xsd:complexType>
									<xsd:complexContent>
										<xsd:extension base="JourneysRequestStructure"/>
									</xsd:complexContent>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="LegDetailsRequest" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request more information about a specific leg.</xsd:documentation>
								</xsd:annotation>
								<xsd:complexType>
									<xsd:complexContent>
										<xsd:extension base="LegDetailsRequestStructure"/>
									</xsd:complexContent>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="StopTimetableRequest" type="StopTimetableRequestStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request a composite timetable of all direct services from A to B.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="ServiceTimetableRequest" type="ServiceTimetableRequestStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request service specific timetables (can be composite).</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="StopEventsRequest" type="StopEventsRequestStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request events at a stop of group of stops.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="ServicesRequest" type="ServicesRequestStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Search for services and timetable details.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="OperatorsRequest" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Request a list of supported operators.</xsd:documentation>
								</xsd:annotation>
								<xsd:complexType>
									<xsd:complexContent>
										<xsd:extension base="OperatorsRequestStructure"/>
									</xsd:complexContent>
								</xsd:complexType>
							</xsd:element>
						</xsd:sequence>
						<xsd:attribute name="Language" type="UkLanguageEnumeration" use="optional" default="EN"/>
						<xsd:attribute name="SuppressNames" type="xsd:boolean" use="optional" default="false"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="Response">
					<xsd:annotation>
						<xsd:documentation>@DataDate.
@DataName (optional).
Contains one or more responses.</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:group ref="MessageGroup"/>
							<xsd:element name="PointsResponse" type="PointsResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the points for the specified RequestID.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="JourneysResponse" type="JourneysResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the journeys for the specified request ID.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="LegDetailsResponse" type="LegDetailsResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains journey leg details for the the specified RequestID.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="TimetableResponse" type="TimetableResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the timetable for the specified RequestID.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="StopEventsResponse" type="StopEventsResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the stop events for the specified RequestID</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="ServicesResponse" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the services for the specified RequestID.</xsd:documentation>
								</xsd:annotation>
								<xsd:complexType>
									<xsd:complexContent>
										<xsd:extension base="ServicesResponseStructure"/>
									</xsd:complexContent>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="OperatorsResponse" type="OperatorsResponseStructure" minOccurs="0" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>@RequestID
Contains the operators for the specified RequestID.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
						</xsd:sequence>
						<xsd:attribute name="DataDate" type="xsd:date" use="required">
							<xsd:annotation>
								<xsd:documentation>Date when the source database was last updated.</xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="DataName" type="xsd:string" use="optional">
							<xsd:annotation>
								<xsd:documentation>Optional name of the source database.</xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
			<xsd:attribute name="SchemaVersion" type="xsd:NMTOKEN" use="required" fixed="3.0b">
				<xsd:annotation>
					<xsd:documentation>The version of the schema that the JourneyWeb instance document was written against. This attribute conforms with e-GIF guidance.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="LocationSystem" type="LocationSystemEnumeration" use="optional" default="Grid">
				<xsd:annotation>
					<xsd:documentation>Location refernce ystem in which to return coordinates</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<!-- ======================================================================= -->
	<!-- Request Types -->
	<xsd:complexType name="PointsRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Points Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:choice>
					<xsd:element name="NptgLocalityRef" type="NptgLocalityRefStructure">
						<xsd:annotation>
							<xsd:documentation>The NPTG locality for which points are being requested.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="Location" type="LocationStructure">
						<xsd:annotation>
							<xsd:documentation>@Precision (optional)
A co-ordinate for which nearby points should be returned. The range of the search is undefined.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:choice>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ==================================================================== -->
	<xsd:complexType name="JourneysRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Journeys Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:group ref="RoutingTopicGroup"/>
					<xsd:group ref="JourneyPolicyGroup" minOccurs="0"/>
					<xsd:group ref="RouteTopicGroup" minOccurs="0"/>
					<xsd:element name="LegDetails" type="LegDetailsStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Options controlling level of  detail returned about the journey leg.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="LegDetailsRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb LegDetails Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:all>
					<xsd:element name="LegRefs">
						<xsd:annotation>
							<xsd:documentation>Legs for which details are requested.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="LegRef" type="IdType" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>Identifies a leg for which details are to be returned.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="LegDetails" type="LegDetailsStructure">
						<xsd:annotation>
							<xsd:documentation>Options controlling level of detail returned.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:all>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="StopTimetableRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb StopTimetable Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:element name="Origin">
						<xsd:annotation>
							<xsd:documentation>Start place for the timetable request.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Place" type="PlaceRefStructure" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>A choice of places for the origin.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="GivenName" type="xsd:string" minOccurs="0">
									<xsd:annotation>
										<xsd:documentation>The name of the origin to be shown in the timetable description. Allows results to be given using the name that the user has selected instead of a name select from NaPTAN (particularly useful with multi-lingual places). Must be  given when a location geocode is used as the origin. </xsd:documentation>
									</xsd:annotation>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="Destination">
						<xsd:annotation>
							<xsd:documentation>Destination point for timetable.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Place" type="PlaceRefStructure" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>A choice of places for the destination.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="GivenName" type="xsd:string" minOccurs="0">
									<xsd:annotation>
										<xsd:documentation>The name of the destination to be shown in the timetable description. Allows results to be given using the name that the user has selected instead of a name select from NaPTAN (particularly useful with multi-lingual places). Must be  given when a location geocode is used as the destination. </xsd:documentation>
									</xsd:annotation>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
					<xsd:group ref="TimetablePolicyGroup"/>
					<xsd:group ref="FilterGroup"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ServiceTimetableRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb ServiceTimetable Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:element name="TimetableDescriptor" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>The unique description of each service that should be output in the composite timetable.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:choice>
								<xsd:element name="Service" type="UniqueServiceStructure">
									<xsd:annotation>
										<xsd:documentation>The minimum required to uniquely identify a service.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:sequence>
									<xsd:element name="PrivateRef" type="xsd:string">
										<xsd:annotation>
											<xsd:documentation>A private service ID that only has meaning to the remote server.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="Direction" type="UnrestrictedDirectionType" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>Only needed when PrivateRef does not give a unique service.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
								</xsd:sequence>
							</xsd:choice>
						</xsd:complexType>
					</xsd:element>
					<xsd:group ref="TimetablePolicyGroup"/>
					<xsd:element name="IncludeSchematic" type="xsd:boolean" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Whether to include a URL to a schematic map of the service (if available).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="StopEventsRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb StopEvents Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:element name="StopPointRef" type="StopPointRefStructure" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>The stops that events are requested for.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="StartTime" type="xsd:dateTime" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Time and date of first event (default now).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="ArrDep" type="EventArriveDepartEnumeration" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Return arrival, departures or all (default all)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="Range" type="RangeStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>The number and extent of events to return. default 24 hours.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="FirstServiceEventOnly" type="xsd:boolean" default="false" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Whether to return only the first event of each service. (default false, i.e return all).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="IncludeIntermediateStops" type="IntermediateStopsRequestEnumeration" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Which types of intermediate stops are to be returned, 'all,' 'before', 'leg', etc (default none).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="RealTime" type="xsd:boolean" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Whether real-time information should be returned (default false, i.e. omit real-time data).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="Filter" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Specifies criteria for omitting services from the response.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Origin" type="StopPointsFilterStructure" minOccurs="0" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@Actual. default false: exclude specified values; true, include specified values.Only return services that have previously passed one to these points (doesn't have to be the service origin unless actual = true). If omitted, do not filter by origin.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="Destination" type="StopPointsFilterStructure" minOccurs="0" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@Actual.  default false: exclude specified values; true, include specified values. Only return services that will go on to pass one to these points (doesn't have to be the service destination unless actual = true). If omitted, do not filter by destination.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:group ref="FilterGroup"/>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ServicesRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Services Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:element name="OperatorRef" type="OperatorRefStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Identifies the operator for which services are to be returned.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="ServiceNumber" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>@BeginWith default false; use whole service number. true, all services that begin with the specified string will be returned e.g. begin with 1 would return services 1, 11, 105, X1, X15, etc
Identifies service to be returned.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:simpleContent>
								<xsd:extension base="ServiceNumberType">
									<xsd:attribute name="BeginWith" type="xsd:boolean" use="optional" default="false"/>
								</xsd:extension>
							</xsd:simpleContent>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="Direction" type="UnrestrictedDirectionType" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>The direction of services which are to be returned.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="Modes" type="ModesFilterStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>@Exclude.  default false: exclude specified modes. true, include specified modes.
The transport modes for which services are to be returned. If omitted, include all modes.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="OperatorsRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Operators Request.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractRequestStructure">
				<xsd:sequence>
					<xsd:element name="Modes" type="ModesFilterStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>@Exclude.  default false: exclude specified modes. true, include specified modes.
The transport modes for which operators are to be returned. If omitted, include operators for all modes.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ======================================================================= -->
	<!-- Response Types -->
	<xsd:complexType name="PointsResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Points Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Points" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Unordered set of points.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Point" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@TimingInformationPoint (optional). true. point is a timing point. false not a timing point, absent: unknown.
@LocalityCentre (optional). true point is a locality centre. false not a locality centre, absent: unknown. </xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:complexContent>
											<xsd:extension base="ReturnedPlaceStructure">
												<xsd:sequence>
													<xsd:element name="Distance" type="DistanceType" minOccurs="0">
														<xsd:annotation>
															<xsd:documentation>If the request was being made using a coordinate and  the distance to the stop has been calculated using a better method than crow-flies then this is the calculated distance to the point.</xsd:documentation>
														</xsd:annotation>
													</xsd:element>
												</xsd:sequence>
												<xsd:attribute name="LocalityCentre" type="xsd:boolean" use="optional"/>
											</xsd:extension>
										</xsd:complexContent>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="JourneysResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Journeys Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Journeys" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Contains the journeys that satisfied the request. If omitted then no journeys could be returned.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Journey" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>An individual journey fulfilling the constraints of the request.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:group ref="MessageGroup">
												<xsd:annotation>
													<xsd:documentation>Information about the journey returned. E.g. 'Does not satisfy accessibility requirements'.</xsd:documentation>
												</xsd:annotation>
											</xsd:group>
											<xsd:element name="Legs" type="LegsStructure">
												<xsd:annotation>
													<xsd:documentation>The legs that make up the complete journey. In sequence of use. </xsd:documentation>
												</xsd:annotation>
											</xsd:element>
											<xsd:element name="Fares" minOccurs="0">
												<xsd:annotation>
													<xsd:documentation>Place holder for future development of fares. Defined at the journey level to accommodate fares that cover more than one leg of the journey.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:sequence>
														<xsd:any minOccurs="0" maxOccurs="unbounded"/>
													</xsd:sequence>
												</xsd:complexType>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="LegDetailsResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb LegDetails Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Legs" type="LegsStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Contains an unordered list of the legs that were requested, to the appropriate level of detail.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="TimetableResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb StopTimetable Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Timetable" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>A service timetable.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Description" type="NaturalLanguageStringStructure">
									<xsd:annotation>
										<xsd:documentation>The title to use for the timetable. For stop to stop timetables it should include the stop names, e.g. London to Edinburgh.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="FirstDate" type="xsd:date">
									<xsd:annotation>
										<xsd:documentation>The first date for which timetable has been generated.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="Days" type="DaysOfOperationStructure">
									<xsd:annotation>
										<xsd:documentation>The days for which this timetable has been generated.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:choice>
									<xsd:element name="LastDate" type="xsd:date">
										<xsd:annotation>
											<xsd:documentation>The last date for which this timetable has been generated.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="OpenEnded" type="xsd:boolean">
										<xsd:annotation>
											<xsd:documentation>Should only be used for pre-generated timetables, timetables generated on the fly should have a LastDate.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
								</xsd:choice>
								<xsd:element name="StopColumn">
									<xsd:annotation>
										<xsd:documentation>The stops that are shown in the first column of the timetable. The size of this list defines the number of rows. The stops must be in the order that they are to be displayed in. The same stop can be repeated (circular routes, and  composite timetables with different stopping patterns).</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="Stop" maxOccurs="unbounded">
												<xsd:annotation>
													<xsd:documentation>@Activity
@StopType</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:attribute name="Activity" type="RowActivityEnumeration" use="optional" default="mixed"/>
															<xsd:attribute name="StopType" type="JourneyStopTypeEnumeration" use="optional" default="intermediate"/>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
								<xsd:element name="TimeColumn" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@Num
The columns on the timetable. The must be in the order they are to be displayed.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="Header">
												<xsd:annotation>
													<xsd:documentation>
Contains all details of the column. Service details are included her to support composite timetables e.g. stop to stop timetables.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:sequence>
														<xsd:element name="ServiceRef" type="xsd:IDREF">
															<xsd:annotation>
																<xsd:documentation>Reference to service details for this column.</xsd:documentation>
															</xsd:annotation>
														</xsd:element>
														<xsd:element name="DaysOfOperation" type="DaysOfOperationStructure" minOccurs="0">
															<xsd:annotation>
																<xsd:documentation>Days of operation if different to those specified in the service details.</xsd:documentation>
															</xsd:annotation>
														</xsd:element>
														<xsd:choice>
															<xsd:element name="NoteAbbreviation" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
																<xsd:annotation>
																	<xsd:documentation>The abbreviation of a note which is defined later in the schema.</xsd:documentation>
																</xsd:annotation>
															</xsd:element>
															<xsd:element name="Note" type="NaturalLanguageStringStructure" minOccurs="0" maxOccurs="unbounded">
																<xsd:annotation>
																	<xsd:documentation>Notes if abbreviations are not being used.</xsd:documentation>
																</xsd:annotation>
															</xsd:element>
														</xsd:choice>
													</xsd:sequence>
												</xsd:complexType>
											</xsd:element>
											<xsd:choice>
												<xsd:choice maxOccurs="unbounded">
													<xsd:element name="Time">
														<xsd:annotation>
															<xsd:documentation>@TimingInformationPoint (optional)
@Activity (optional).
Used for a column of times.  Must be one for each stop. Activity only needed if row Activity is Mixed.</xsd:documentation>
														</xsd:annotation>
														<xsd:complexType>
															<xsd:simpleContent>
																<xsd:extension base="xsd:time">
																	<xsd:attribute name="TimingInformationPoint" type="xsd:boolean" use="optional"/>
																	<xsd:attribute name="Activity" type="StopActivityEnumeration" use="optional" default="pickUpAndSetDown"/>
																</xsd:extension>
															</xsd:simpleContent>
														</xsd:complexType>
													</xsd:element>
													<xsd:element name="NoTime" type="xsd:string"/>
												</xsd:choice>
												<xsd:element name="Label" type="NaturalLanguageStringStructure" maxOccurs="unbounded">
													<xsd:annotation>
														<xsd:documentation>Used for a column that includes text only e.g. frequency column. Must be a label for every stop.</xsd:documentation>
													</xsd:annotation>
												</xsd:element>
											</xsd:choice>
										</xsd:sequence>
										<xsd:attribute name="Num" type="xsd:int" use="required"/>
									</xsd:complexType>
								</xsd:element>
								<xsd:element name="Service" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@Ref.
Details for the service references used in the columns.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:complexContent>
											<xsd:extension base="ServiceResponseStructure">
												<xsd:attribute name="Ref" type="xsd:ID" use="required"/>
											</xsd:extension>
										</xsd:complexContent>
									</xsd:complexType>
								</xsd:element>
								<xsd:element name="Notes" minOccurs="0" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>General timetable notes or the notes to go with abbreviations used in the columns.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="Abbreviation" type="xsd:string" minOccurs="0">
												<xsd:annotation>
													<xsd:documentation>If left blank then the note represents a general timetable note.</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
											<xsd:element name="Note" type="NaturalLanguageStringStructure">
												<xsd:annotation>
													<xsd:documentation>The note that goes with the abbreviation.</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="StopEventsResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb StopEvents Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Events" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>The arrivals or departures at a stop.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Event" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>An arrival or departure at a stop.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="Origin" minOccurs="0">
												<xsd:annotation>
													<xsd:documentation>@TimingInformationPoint.
The origin of this vehicle. Only omitted if the event occurs at the origin.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:sequence>
																<xsd:element name="TimetabledDepartureTime" type="xsd:dateTime" minOccurs="0">
																	<xsd:annotation>
																		<xsd:documentation>The timetabled departure time from the origin. If frequency based service then leave out - frequency is defined in stop below.</xsd:documentation>
																	</xsd:annotation>
																</xsd:element>
																<xsd:group ref="RTDepartureTimeGroup"/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="PreviousIntermediate" minOccurs="0" maxOccurs="unbounded">
												<xsd:annotation>
													<xsd:documentation>@TimingInformationPoint
The stops between the origin and the requested stop. Only returned if requested.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:sequence>
																<xsd:group ref="IntermediateTimeGroup"/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="Stop">
												<xsd:annotation>
													<xsd:documentation>@TimingInformationPoint
The stop where the event occurs.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:sequence>
																<xsd:group ref="EventTimeGroup"/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="OnwardIntermediate" minOccurs="0" maxOccurs="unbounded">
												<xsd:annotation>
													<xsd:documentation>@TimingInformationPoint
The stops between the requested stop and the destination. Only returned if requested.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:sequence>
																<xsd:group ref="IntermediateTimeGroup"/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="Destination" minOccurs="0">
												<xsd:annotation>
													<xsd:documentation>@TimingInformationPoint
The destination of this vehicle. Only omitted if the event occurs at the destination.</xsd:documentation>
												</xsd:annotation>
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="ReturnedPlaceStructure">
															<xsd:sequence>
																<xsd:element name="TimetabledArrivalTime" type="xsd:dateTime" minOccurs="0">
																	<xsd:annotation>
																		<xsd:documentation>The timetabled arrival time at the destination.</xsd:documentation>
																	</xsd:annotation>
																</xsd:element>
																<xsd:group ref="RTArrivalTimeGroup"/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="ServiceRef" type="xsd:IDREF">
												<xsd:annotation>
													<xsd:documentation>Reference to service details for this event</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
								<xsd:element name="Service" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>@Ref.
Details for the service references used in the stop events.</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:complexContent>
											<xsd:extension base="ServiceResponseStructure">
												<xsd:attribute name="Ref" type="xsd:ID" use="required"/>
											</xsd:extension>
										</xsd:complexContent>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ServicesResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb ServiceTimetable Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Services" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>A collection of services meeting the  request criteria.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Service" type="ServiceResponseStructure" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>Description of a transport service.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="OperatorsResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Type for JourneyWeb Operators Response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractResponseStructure">
				<xsd:sequence>
					<xsd:group ref="MessageGroup"/>
					<xsd:element name="Operators" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Transport service operators</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="Operator" maxOccurs="unbounded">
									<xsd:annotation>
										<xsd:documentation>Transport service operator</xsd:documentation>
									</xsd:annotation>
									<xsd:complexType>
										<xsd:sequence>
											<xsd:element name="OperatorRef" type="OperatorRefStructure">
												<xsd:annotation>
													<xsd:documentation>A code Identifying Transport Service Operator</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
											<xsd:element name="Name" type="NaturalLanguageStringStructure">
												<xsd:annotation>
													<xsd:documentation>The customer facing name of the operator.</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
											<xsd:element name="Mode" type="VehicleModesEnumeration">
												<xsd:annotation>
													<xsd:documentation>Transport Mode of Service provided by operator</xsd:documentation>
												</xsd:annotation>
											</xsd:element>
										</xsd:sequence>
									</xsd:complexType>
								</xsd:element>
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ======================================================================= -->
	<!--Journey  Request element groups -->
	<xsd:complexType name="RangeStructure">
		<xsd:annotation>
			<xsd:documentation>Additional general constraints on Requests.</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element name="Sequence" type="xsd:int">
				<xsd:annotation>
					<xsd:documentation>The number of journeys to return after the departure time or before the arrival time.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Interval" type="DayTimeDurationType">
				<xsd:annotation>
					<xsd:documentation>An interval after a departure time or before an arrival time for which journeys should be returned.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="LimitedInterval">
				<xsd:annotation>
					<xsd:documentation>Used to limit the number of journeys returned for an interval. e.g. Get the first 3 journeys in the next 6 hours. An example use of this is to get the first 3 journeys during an off-peak period i.e. stop the search before the peak period starts.
</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Max" type="xsd:int">
							<xsd:annotation>
								<xsd:documentation>Maximum number of journeys</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="Interval" type="DayTimeDurationType">
							<xsd:annotation>
								<xsd:documentation>An interval after a departure time or before an arrival time for which journeys should be returned.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="Min" type="xsd:int" default="0" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Minimum number of journeys to return. If greater than zero this will extend the interval if not enough journeys have been found. Default zero.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="MaxInterval" type="DayTimeDurationType" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>The maximum interval to search when extending the interval to find a minimum number of journeys to return. The default of 24 hours is not included in the schema due to validation problems with Xerces.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:complexType>
	<xsd:group name="RoutingTopicGroup">
		<xsd:annotation>
			<xsd:documentation>Options controlling the journey request routing content</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Origin" type="OriginDestinationRequestStructure">
				<xsd:annotation>
					<xsd:documentation>The places used for the origin.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:choice>
				<xsd:element name="Via" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>Via place for passing only (no stopover times).</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="Place" type="PlaceRefStructure" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>The via only has to go via one of these places e.g. if this defined all the bays in a bus station the journey only has to go via one of the bays.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="GivenName" type="NaturalLanguageStringStructure" minOccurs="0">
								<xsd:annotation>
									<xsd:documentation>The name of the via to be used in the results. Allows results to be given using the name that the user has selected instead of a name select from NaPTAN (particularly useful with multi-lingual places). Must be  given when a location geocode is used as the via. </xsd:documentation>
								</xsd:annotation>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="NotVia" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>Not via places to avoid.</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="Place" type="PlaceRefStructure" maxOccurs="unbounded">
								<xsd:annotation>
									<xsd:documentation>The resulting journey must not stop at any of these points.</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							<xsd:element name="GivenName" type="xsd:string" minOccurs="0">
								<xsd:annotation>
									<xsd:documentation>The name of the not-via to be used in the results. Allows results to be given using the name that the user has selected instead of a name select from NaPTAN (particularly useful with multi-lingual places). Must be  given when a location geocode is used as the not via. </xsd:documentation>
								</xsd:annotation>
							</xsd:element>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:choice>
			<xsd:element name="Destination" type="OriginDestinationRequestStructure">
				<xsd:annotation>
					<xsd:documentation>The places used for the destination.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<xsd:group name="JourneyPolicyGroup">
		<xsd:annotation>
			<xsd:documentation>Options controlling the way the journey plan is computed</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="ArrDep" type="ArriveDepartEnumeration">
				<xsd:annotation>
					<xsd:documentation>Whether the request is an arrive-before or depart-after request.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Range">
				<xsd:annotation>
					<xsd:documentation>The number and extent of journeys to return.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="RangeStructure">
							<xsd:choice minOccurs="0">
								<xsd:element name="EachOrigin" type="xsd:boolean">
									<xsd:annotation>
										<xsd:documentation>The requested journeys are returned from each origin place to any of the destination places.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="EachDestination" type="xsd:boolean">
									<xsd:annotation>
										<xsd:documentation>The requested journeys are returned from any origin place to each of the destination places.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
							</xsd:choice>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="Algorithm" type="AlgorithmEnumeration" default="default" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Type of search algorithm (default is default)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="WalkSpeed" type="SpeedEnumeration" default="normal" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Preferred walk speed (default normal).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="MaxWalkDistance" type="DistanceType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Maximum walking distance tolerated.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="InterchangeSpeed" type="SpeedEnumeration" default="normal" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Preferred interchange speed (default normal).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<xsd:group name="RouteTopicGroup">
		<xsd:annotation>
			<xsd:documentation>Options for restricting the available routes on a  journey request .</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="LimitedAccessibility" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Specifies if routes with limited accessibility interchanges should be requested.  Defaults to no accessibility exclusions.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="ExcludeHazard" type="AccessibilityHazardEnumeration" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Requests a journey without the specified accessibility hazard.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:group ref="FilterGroup"/>
		</xsd:sequence>
	</xsd:group>
	<xsd:complexType name="LegDetailsStructure">
		<xsd:annotation>
			<xsd:documentation>Options controlling level of detail returned.</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="IncludeIntermediateStops" type="IntermediateStopsRequestEnumeration" default="none" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Which types of intermediate stops are to be returned (default none). all, before leg, etc.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="IncludeTracks" type="xsd:boolean" default="false" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether to include detailed track information for the legs for which track data is available (default false).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="IncludeInstructions" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether to include textual instructions for legs using particular modes. Default is to omit all instructions. Note that including instructions for a particular mode will also include track data for that mode (even if IncludeTracks has been set to false).</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Mode" type="AllModesEnumeration" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Specifies a mode for which leg instructions should be returned.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="IncludeInterchanges" type="xsd:boolean" default="false" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether to include detailed interchange information in response (default false).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="RealTime" type="xsd:boolean" default="false" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether real-time information be returned (default false).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="MappingSystem" type="MappingSystemRequestEnumeration" default="none" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The mapping system which the client understands e.g. TOID, OSODR, NavTech, MDV, none. Defaults to none - i.e. no mapping system references are to be returned.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:all>
	</xsd:complexType>
	<xsd:group name="FilterGroup">
		<xsd:annotation>
			<xsd:documentation>Common Filters</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Modes" type="ModesStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@Exclude.  default false: exclude specified values; true, include specified values.
Which modes of transport to include in request. If omitted then all modes are to be included.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Operators" type="OperatorsFilterStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@Exclude.  default false: exclude specified values; true, include specified values.
The operators to include/exclude from the calculation.  If omitted then all operators may be included.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Services" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@Exclude.  default false: exclude specified values; true, include specified values.
The services to include/exclude from the calculation.  If omitted all services may be included.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Service" type="ServiceRequestStructure" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>Service to be included or excluded.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="Exclude" type="xsd:boolean" use="optional" default="false"/>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<!-- ======================================================================= -->
	<!-- Common types used on requests-->
	<xsd:complexType name="OriginDestinationRequestStructure">
		<xsd:annotation>
			<xsd:documentation>Type for specifying origin and destination places on requests.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Places" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>The individual places that make up the origin or destination. In most cases these are a choice of start or end places (see Range).</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Place" type="PlaceRefStructure">
							<xsd:annotation>
								<xsd:documentation>Identifier(s) of the place. Normally one of the following. Multiple NaPTAN identifiers may be used.  </xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="JourneyTime" type="xsd:dateTime" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>The arrive or depart time and date for this place.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="Seed" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Details of the calculation so far from the origin or destination.
Can be used to implement the maxChanges algorithm, to allow the journey to continue on the same vehicle, etc.</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="StartTime" type="xsd:dateTime" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>For depart after requests this is the departure time at the origin.
For arrive by requests this is the arrival time at the destination.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="NumChanges" type="xsd:int" minOccurs="0"/>
									<xsd:element name="Service" type="UniqueServiceStructure" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>The last service used in the calculation. Used in conjunction with JourneyTime to allow the same vehicle to be used.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
									<xsd:element name="WalkDistance" type="DistanceType" minOccurs="0">
										<xsd:annotation>
											<xsd:documentation>The walk distance so far in metres.</xsd:documentation>
										</xsd:annotation>
									</xsd:element>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="GivenName" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The name of the origin/destination to be used in the results. Allows results to be given using the name that the user has selected instead of a name select from NaPTAN (particularly useful with multi-lingual places). Must be  given when a location geocode is used as the origin/destination. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:group name="TimetablePolicyGroup">
		<xsd:annotation>
			<xsd:documentation>Options controlling how the timetable should be returned.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Date" type="xsd:date">
				<xsd:annotation>
					<xsd:documentation>The date for which the timetable is to be generated.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Generic" type="xsd:boolean">
				<xsd:annotation>
					<xsd:documentation>If true then the timetable that spans the specified date is returned. If false then the timetable for only the specified day is returned.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="TimingInformationPointsOnly" type="xsd:boolean" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether to only include timing information points in the response.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="EarliestDepartTime" type="xsd:time" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The earliest departure time to include in the output.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="LatestDepartTime" type="xsd:time" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The latest departure time to include in the output.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="FirstColumn" type="xsd:int" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The number of the first column to return.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="MaxColumns" type="xsd:int" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The maximum number of columns to return.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<!-- ======================================================================= -->
	<!-- Common service types -->
	<xsd:complexType name="ServiceResponseStructure">
		<xsd:annotation>
			<xsd:documentation>Information that can be returned about a service in a response.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="UniqueServiceStructure">
				<xsd:sequence>
					<xsd:element name="Mode" type="VehicleModesEnumeration">
						<xsd:annotation>
							<xsd:documentation>Transport mode of service, e.g. bus</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:group ref="ServiceResponseExtrasGroup"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ContinuousLegServiceStructure">
		<xsd:annotation>
			<xsd:documentation>Description of a service used in a Continuous Leg.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="OptionalServiceStructure"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:group name="ServiceResponseExtrasGroup">
		<xsd:annotation>
			<xsd:documentation>Shared elements between the ServiceResponseStructure and the ContinuousLegServiceStructure.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="OperatorName" type="NaturalLanguageStringStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The customer facing name of the operator.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Description" type="NaturalLanguageStringStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The description of the service.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="FirstDateOfOperation" type="xsd:date" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Date that service commences.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="DaysOfOperation" type="DaysOfOperationStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The days of the week for which this trip is valid at this time. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:choice minOccurs="0">
				<xsd:element name="ExpiryDate" type="xsd:date">
					<xsd:annotation>
						<xsd:documentation>The last day that this trips timetable is valid.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="OpenEnded">
					<xsd:annotation>
						<xsd:documentation>The timetable does not have a specified end date.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:element name="DestinationBoard" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The name displayed on the front of this vehicle.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="TimetableLink" type="TimetableLinkStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Link to a timetable for this leg of the journey.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<!-- ======================================================================= -->
	<!-- Common response types -->
	<xsd:complexType name="ReturnedPlaceStructure">
		<xsd:annotation>
			<xsd:documentation>@TimingInformationPoint (optional)
Represents a place in a response.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Name" type="NaturalLanguageStringStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A meaningful name for the place that will be given to the end user.
If a GivenName was input in the request it should be returned here. This will usually contain more than the NaPTAN name e.g. Locality and NaPTAN name - Epsom: High Street</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:choice>
				<xsd:sequence>
					<xsd:element name="StopPointRef" type="StopPointRefStructure">
						<xsd:annotation>
							<xsd:documentation>Identifier of a NaPTAN node</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="Location" type="LocationStructure" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>@Precision (optional) default 1 km
The coordinate of the NaPTAN stop - can be used for rudimentary map displays.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
				<xsd:element name="Location" type="LocationStructure">
					<xsd:annotation>
						<xsd:documentation>@Precision (optional) default 1km
A point on a map.</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:element name="Bay" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Additional bay information that is not implied by a NaPTAN identifier e.g. rail platform.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="TimingInformationPoint" type="xsd:boolean" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="TimetableLinkStructure">
		<xsd:annotation>
			<xsd:documentation>Type for URL to timetable.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="URL" type="xsd:anyURI" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A URL which can be used to obtain a pre-rendered timetable - PDF, HTML, etc.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="SchematicURL" type="xsd:anyURI" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A URL which can be used to obtain a pre-rendered schematic map of the service - PDF, HTML, etc.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="PrivateRef" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A private identifier to unique identify a timetable (may represent both directions with a single ID - in which case direction will be defined as well). This can be used ServiceTimetableRequest to obtain the timetable data.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Direction" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Used if the PrivateRef  doesn't include direction</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="MatrixDataAvailable" type="xsd:boolean">
				<xsd:annotation>
					<xsd:documentation>Indicates if matrix timetable data can be requested for this timetable.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="LegsStructure">
		<xsd:annotation>
			<xsd:documentation>A collection of legs.</xsd:documentation>
		</xsd:annotation>
		<xsd:choice maxOccurs="unbounded">
			<xsd:element name="TimedLeg" type="TimedLegStructure">
				<xsd:annotation>
					<xsd:documentation>A leg that runs to a timetabled time.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="FrequencyLeg" type="FrequencyLegStructure">
				<xsd:annotation>
					<xsd:documentation>A leg that runs to a given frequency.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="ContinuousLeg" type="ContinuousLegStructure">
				<xsd:annotation>
					<xsd:documentation>A leg that doesn't run to any type of schedule, e.g. walking, cycling</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="InterchangeLeg" type="InterchangeLegStructure">
				<xsd:annotation>
					<xsd:documentation>A leg that describes an interchange. Can occur as end leg as well as within journey (e.g. Waterloo station to TCR - would need to interchange to underground first).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="LegTrackStructure">
		<xsd:annotation>
			<xsd:documentation>Geospatial representation of a leg for mapping and instructional purposes.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Track" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>@Id:an optional reference to the operator's Id for for the segment.

A track segment describes a section of the geospatial representation of a leg. The choice of segments subdividing a leg is left up to the server.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Map" type="MapStructure">
							<xsd:annotation>
								<xsd:documentation>Information to create a visual map.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="MapSystemReference" type="MapSystemReferenceStructure" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>@MappingSystem
A mapping system reference (e.g. TOID, OSODR, NavTech, MDV) value which the requesting client has asked for.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element name="Instructions" type="TrackInstructionsStructure" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>This contains the information necessary to describe a track segment textually in a step by step fashion.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="Id" type="IdType">
						<xsd:annotation>
							<xsd:documentation>Identifies the segment according to its TransXChange ID.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="TotalDistance" type="DistanceType" use="optional"/>
	</xsd:complexType>
	<!-- ======================================================================= -->
	<!-- Journey leg types -->
	<xsd:complexType name="AbstractLegStructure" abstract="true">
		<xsd:annotation>
			<xsd:documentation>An abstract base type for non-interchange legs.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:group ref="MessageGroup">
				<xsd:annotation>
					<xsd:documentation>Information about the leg returned. E.g. Intermediate stops not available.</xsd:documentation>
				</xsd:annotation>
			</xsd:group>
			<xsd:element name="ServiceOrigin" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional)
The origin place.
Only omitted if the board place is the origin.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:group ref="OriginTimeGroup"/>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="IntermediateA" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional)
Returned if IncludeIntermediateStops is set to 'all'.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:group ref="IntermediateTimeGroup"/>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="LegBoard">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional)</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:sequence>
								<xsd:element name="Pass" type="xsd:boolean" minOccurs="0">
									<xsd:annotation>
										<xsd:documentation>true if this is the requested via point.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="InterchangeTime" type="xsd:time" minOccurs="0"/>
								<xsd:group ref="BoardTimeGroup"/>
							</xsd:sequence>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="IntermediateB" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional).
Returned if IncludeIntermediateStops is set to 'all' or 'leg', or this is the via point i.e. pass = true.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:sequence>
								<xsd:element name="Pass" type="xsd:boolean" minOccurs="0">
									<xsd:annotation>
										<xsd:documentation>true if this is the requested via point</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:group ref="IntermediateTimeGroup"/>
							</xsd:sequence>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="LegAlight">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional).
</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:sequence>
								<xsd:element name="Pass" type="xsd:boolean" minOccurs="0">
									<xsd:annotation>
										<xsd:documentation>true if this is the requested via point.</xsd:documentation>
									</xsd:annotation>
								</xsd:element>
								<xsd:element name="InterchangeTime" type="xsd:time" minOccurs="0"/>
								<xsd:group ref="AlightTimeGroup"/>
							</xsd:sequence>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="IntermediateC" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional)
Returned if IncludeIntermediateStops is set to 'all'.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:group ref="IntermediateTimeGroup"/>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="ServiceDestination" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@TimingInformationPoint (optional).
The destination place.  Only omitted if the alight place is the destination.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:extension base="ReturnedPlaceStructure">
							<xsd:group ref="DestinationTimeGroup"/>
						</xsd:extension>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="LegTrack" type="LegTrackStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>@TotalDistance
Geospatial representation of the leg for mapping and instructional purposes.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Notes" type="NaturalLanguageStringStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Any notes about the vehicle or walk.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="legId" type="IdType">
			<xsd:annotation>
				<xsd:documentation>Identifies the leg for future reference in any LegDetailsRequests.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="TimedLegStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a leg that runs to a schedule.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractLegStructure">
				<xsd:sequence>
					<xsd:element name="Service">
						<xsd:complexType>
							<xsd:complexContent>
								<xsd:extension base="ServiceResponseStructure"/>
							</xsd:complexContent>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="FrequencyLegStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a leg that runs a frequency based service.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractLegStructure">
				<xsd:sequence>
					<xsd:element name="Service" type="ServiceResponseStructure"/>
					<xsd:element name="OriginDestinationTimes" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Times for the complete trip of the vehicle.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:group ref="FrequencyTimeGroup"/>
						</xsd:complexType>
					</xsd:element>
					<xsd:element name="BoardAlightTimes">
						<xsd:annotation>
							<xsd:documentation>Times for the part of the journey the traveller will make.</xsd:documentation>
						</xsd:annotation>
						<xsd:complexType>
							<xsd:group ref="FrequencyTimeGroup"/>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ContinuousLegStructure">
		<xsd:annotation>
			<xsd:documentation>LegBoard and LegAlight should be used to describe walk, etc. ServiceOrigin and ServiceDestination should only be used for DRT.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="AbstractLegStructure">
				<xsd:sequence>
					<xsd:element name="Service" type="ContinuousLegServiceStructure">
						<xsd:annotation>
							<xsd:documentation>Description of the service (mostly optional as could be used to describe a walk leg).</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:group ref="DurationWindowGroup"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="InterchangeLegStructure">
		<xsd:annotation>
			<xsd:documentation>Structure of an interchange leg.</xsd:documentation>
		</xsd:annotation>
		<xsd:all>
			<xsd:element name="LegOrigin" type="ReturnedPlaceStructure">
				<xsd:annotation>
					<xsd:documentation>Start point of Leg. Equivalent to the "LegBoard" for this leg (but since there is no vehicle involved there can be no boarding).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="LegDestination" type="ReturnedPlaceStructure">
				<xsd:annotation>
					<xsd:documentation>End point of Leg. Equivalent to the "LegAlight" for this leg (but since there is no vehicle involved there can be no alighting).</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="InterchangePath" type="InterchangePathStructure">
				<xsd:annotation>
					<xsd:documentation>Describes the interchange in terms of a sequence of pairs of nodes and links with accessibility and duration.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Map" type="MapStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Optional mapping information for displaying interchange legs.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="InterchangeSchematics" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Schematics are hyperlink references to hand-crafted schematic map images.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="SchematicURL" type="xsd:anyURI" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>A hyperlink to the schematic map. Maps should be in a web compatible image format (e.g. JPEG, GIF) that can be embedded in a web page or a PDF.</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:all>
		<xsd:attribute name="legId" type="IdType"/>
	</xsd:complexType>
</xsd:schema>

