<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apd="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails" xmlns="http://www.transxchange.org.uk/" xmlns:txc="http://www.transxchange.org.uk/" xmlns:napt="http://www.naptan.org.uk/" targetNamespace="http://www.transxchange.org.uk/" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.5" id="TransXChangeRegistration">
	<xsd:annotation>
		<xsd:appinfo>
			<Metadata xmlns="http://www.govtalk.gov.uk/CM/gms-xs">
				<Aggregation>main schema</Aggregation>
				<Audience>e-service developers</Audience>
				<Contributor>Revised for version 2.4 Kizoom Limited,  , Nicholas Knowles. </Contributor>
				<Contributor>Revised for version 2.4 Roger Slevin [Roger Slevin dft .gsi gov.uk]</Contributor>
				<Contributor>Revised for version 2.0 Kizoom Limited, by Tom White, Nicholas Knowles. mailto:schemer@kizoom.com</Contributor>
				<Contributor>Roger Slevin [Roger Slevin dft .gsi gov.uk]</Contributor>
				<Contributor>Paul Robinson [Paul Robinson carlbro  ]</Contributor>
				<Contributor>Richard Mejia [Richard Mejia carlbro  ]</Contributor>
				<Coverage>United Kingdom</Coverage>
				<Creator>Created as W3C .xsd schema by CGEY as 1.1 XML schema, Ross Dixon, Kieran Holmes mailto:ross.dixon@cgey.com</Creator>
				<Date>
					<Created>2001-05-20</Created>
				</Date>
				<Date>
					<Modified>2003-09-11</Modified>
				</Date>
				<Date>
					<Modified>2004-02-01</Modified>
				</Date>
				<Date>
					<Modified>2004-03-08</Modified>
				</Date>
				<Date>
					<Modified>2004-07-01</Modified>
				</Date>
				<Date>
					<Modified>2005-09-05</Modified>
					<!--  V2.1  2005 09 05   Change to ref NaPT journey & stop 2.1 (Make Landmark and street optional)   -->
				</Date>
				<Date>
					<Modified>2005-09-27</Modified>
					<!--  V2.1         2005 09 27 
             Add TransXChangeNptgLocalities  and  AnnotatedNptgLocalityRef  to support TXC  publisher enhancement  -->
				</Date>
				<Date>
					<Modified>2007-03-11</Modified>
					<!-- V2.2a  2006 12 22   Create 2.2a for TXc pub  test  
					 V2.2b  2007 03 04             Create 2.2b for Further changes -->
				</Date>
				<Date>
					<Modified>2010-02-12</Modified>
					<!-- v 2.4 Changes in Subschemas
							Remove chameleon namespace and improve modularisation
						   Add top levelk group to improve doc
                    PTIC035 
	                   Add Calendar
					PTIC-039 Journey Interchanges
						   Include ConnectingVehiclleJourney in constraints
				     PTIC-027  
                         Add Day types & Constraints
 -->
				</Date>
				<Description>
					<p>The TransXChange is a UK nationwide system for exchanging bus schedules. It is used both for the electronic registration of bus routes with the Vehicle Operating Services Agency  (VOSA), and for the exchange of bus routes with other systems such as journey planners and real-time tracking systems.</p>
					<p>There are two closely related but distinct TransXChange XML schemas:</p>
					<ul>
						<li>A <strong>Registration</strong> schema for registering a bus timetable. This includes mandatory elements.</li>
						<li>A <strong>General</strong> schema for exchanging bus timetable data between systems of all sorts.</li>
					</ul>
					<p>This document is the registration schema.</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.transxchange.org.uk/schemas/2.4}TransXChange_registration.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.transxchange.org.uk/schemas/2.5/txc/TXC_common-v2-5.xsd</Requires>
				</Relation>
				<Relation>
					<HasPart>http://www.transxchange.org.uk/schemas/2.4/txc/TXC_common-v2-5.xsd</HasPart>
				</Relation>
				<Rights>Unclassified
                            <Copyright>(C) Crown Copyright 2000-2010</Copyright>
				</Rights>
				<Source>
					<ul>
						<li>Originally developed as Version 1.0 in 2000 from Transmodel and ATCO -CIF, By Ross Dixon and Kieran Holmes of CGEY.</li>
						<li>Revised as Version 1.1, 2001 by Ross Dixon</li>
						<li>Revised as Version 1.2, 2002 by Ross Dixon</li>
						<li>Revised as Version 2.1, 2005 by Nick Knowles</li>
						<li>Revised as Version 2.2, 2007 by Nick Knowles</li>
						<li>Revised as Version 2.4, 2010 by Nick Knowles</li>
					</ul>
				</Source>
				<Status>Version 2.4</Status>
				<Subject>
					<Category>Arts, recreation and travel, Tourism, Travel (tourism), Transport,
Public transport,
Bus services, Coach services, Bus stops and stations
Rail transport, Infrastructure (railways), Train services,
Roads and road transport</Category>
					<Project>Transport Direct</Project>
				</Subject>
				<Title>TransXChange Registration Schema, an XML format for registering bus timetables.</Title>
				<Type>Standard</Type>
			</Metadata>
		</xsd:appinfo>
		<xsd:documentation>TransXChange_registration Schema     HEADER DOCUMENTATION</xsd:documentation>
	</xsd:annotation>
	<xsd:include schemaLocation="txc/TXC_common-v2-5.xsd"/>
	<!-- =====Xerxes workaround======================================== -->
	<!-- ======================================================================= -->
	<!-- TransXChange Root -->
	<xsd:group name="TransXChangeRegistrationGroup">
		<xsd:annotation>
			<xsd:documentation>Elements for a TXC registration.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="ServicedOrganisations" type="ServicedOrganisationsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of Serviced Organisations and their working and non-working days.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="ServiceCalendars" type="ServiceCalendarsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Calendars for  (TXC v2.4)</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="NptgLocalities" type="TransXChangeNptgLocalitiesStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Names of Nptg Localities used in Local stop definitions. Allows  an optional  local copy of name data for localities taken from the NPTG. Locality names can be included in a TransXChange document to support the Publishing of stop names that include the locality name eg "Barset, High Street".  Locality names of externally referenced NaPTAN stops should be included in the AnnotatedStopPointRef instead. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="StopPoints" type="TransXChangeStopPointsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Local Stop definitions for Stops used in services. Normally Stops will be defined simply by referencing their NaPTAN AtcoCode in a StopPointRef. Stops can also be defined locally here.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="StopAreas" type="StopAreasStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Local StopArea definitions. Normally StopAreas will be defined as part of their NaPTAN Definition. Areas can be defined locally here. </xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="RouteSections" type="RouteSectionsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of the Route Sections, i.e. collections of  of route links, making up all or part of a Route. These are used in Route definitions.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Routes" type="RoutesStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of transport Routes.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="JourneyPatternSections" type="JourneyPatternSectionsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of Journey Pattern sections.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Operators" type="OperatorsStructure">
				<xsd:annotation>
					<xsd:documentation>Definitions of operators.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Services" type="ServicesStructure">
				<xsd:annotation>
					<xsd:documentation>Definitions of services.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="VehicleJourneys" type="VehicleJourneysStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Definitions of vehicle journeys, used in one or more services.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="Registrations">
				<xsd:annotation>
					<xsd:documentation>Registration details, which must contain exactly one Registration element.</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element ref="Registration"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="SupportingDocuments" type="SupportingDocumentsStructure" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Additional documents relating to the contents. .
Documents that relate specifically to the registartion</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:group>
	<xsd:element name="TransXChange">
		<xsd:annotation>
			<xsd:documentation>Schema for exchanging a bus schedule for registration with a Traffic Area Network.
@xml:lang
@CreationDateTime,
@ModificationDateTime,
@Modification,
@RevisionNumber,
@FileName,
@SchemaVersion,
@MappingSystem,
@LocationSystem,
@RegistrationDocument</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:group ref="TransXChangeRegistrationGroup"/>
				<xsd:element ref="PublishingOptions" minOccurs="0"/>
			</xsd:sequence>
			<xsd:attributeGroup ref="DocumentModificationDetailsGroup"/>
			<xsd:attributeGroup ref="DocumentMetadataGroup"/>
			<xsd:attribute name="LocationSystem" type="LocationSystemEnumeration" use="optional" fixed="Grid">
				<xsd:annotation>
					<xsd:documentation>Data system to use for location coordinate references within the document. This is fixed to be Grid for registration documents.</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="RegistrationDocument" type="RegistrationDocumentType" use="required" fixed="true"/>
		</xsd:complexType>
		<!-- == Constraints ==================================================   -->
		<xsd:unique name="AnyDayTypeKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrirt Rule I13. id of each DayType must be unique within document. (TXC v2.4).</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:DayType"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="AnyDayTypeKeyRef" refer="AnyDayTypeKey">
			<xsd:annotation>
				<xsd:documentation>Integrity Rule I13.  DayTypeRef instances must refer to a unique local definition of a DayType. (TXC v2.4)</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:DayTypeRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:key name="AnyStopPointKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C1a. Stop Codes of local StopPoint  and AnnotatedStopPointRef declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopPoints/txc:StopPoint/txc:AtcoCode|.//txc:StopPoints/txc:AnnotatedStopPointRef/txc:StopPointRef"/>
			<xsd:field xpath="."/>
		</xsd:key>
		<xsd:keyref name="AnyStopPointKeyRef" refer="AnyStopPointKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C1b. StopPointRef instances must reference a StopPoint or AnnotatedStopPoint declaration. Add Connecting Journey ref TXC 2.4</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopPointRef|.//txc:VariableStopPointRef|.//txc:InboundStopPointRef|.//txc:OutboundStopPointRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="StopPointPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U1a. PrivateCodes of   StopPoint declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopPoints/txc:StopPoint"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:key name="StopAreaKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C2a. Codes of local StopArea (Cluster) ) declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopAreas/txc:StopArea"/>
			<xsd:field xpath="txc:StopAreaCode"/>
		</xsd:key>
		<xsd:keyref name="StopAreaKeyRef" refer="StopAreaKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C2b. StopPointRef instances must reference a StopPoint or AnnotatedStopPoint declaration. See also External Integrity rule N1.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopAreaRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="StopAreaPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U2a. PrivateCodes of   StopArea declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:StopAreas/txc:StopArea"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:key name="ServicedOrganisationKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C3a. Codes of ServicedOrganisation declarations must be unique within operator</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:ServicedOrganisations/txc:ServicedOrganisation"/>
			<xsd:field xpath="txc:OrganisationCode"/>
		</xsd:key>
		<xsd:keyref name="ServicedOrganisationKeyRef" refer="ServicedOrganisationKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C3b. ServicedOrganisationRef instances must reference a local definition of a ServicedOrganisation element. Add ParentRef v2.4</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:ServicedOrganisationRef| .//txc:ParentServicedOrganisationRef|.//txc:UltimateParentServicedOrganisationRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="ServicedOrganisationPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U6a. PrivateCodes of   ServicedOrganisation declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:ServicedOrganisations/txc:ServicedOrganisation"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:key name="ServiceKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C4a. Code of each Service must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Services/txc:Service"/>
			<xsd:field xpath="txc:ServiceCode"/>
		</xsd:key>
		<xsd:keyref name="ServiceKeyRef" refer="ServiceKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C4b. ServiceRef instances must refer to a local definition of a Service.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:ServiceRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="ServicePrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U8a. PrivateCodes of   Service declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Services/txc:Service"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="AnyVehicleJourneyKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C5 Code of each VehicleJourney, FlexibleVehicleJourney  or ConnectingVehicleJourney must be unique within document. (TXC 2.4 add connecting Journey)</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneys/txc:VehicleJourney|.//txc:VehicleJourneys/txc:FlexibleVehicleJourney|.//txc:VehicleJourneys/txc:ConnectingVehicleJourney"/>
			<xsd:field xpath="txc:VehicleJourneyCode"/>
		</xsd:unique>
		<xsd:keyref name="AnyVehicleJourneyKeyRef" refer="AnyVehicleJourneyKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C5. VehicleJourneyRef instances must reference a local definition of a VehicleJourney. </xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneyRef|.//txc:InboundVehicleJourneyRef|.//txc:OutboundVehicleJourneyRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="VehicleJourneyPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U3a. PrivateCodes of   VehicleJourney declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneys/txc:VehicleJourney"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="GarageKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C6a. Codes of Garage declarations must be unique within document</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Operators/txc:LicensedOperator/txc:Garages/txc:Garage|.//txc:Operators/txc:Operator/txc:Garages/txc:Garage"/>
			<xsd:field xpath="txc:GarageCode"/>
		</xsd:unique>
		<xsd:keyref name="GarageKeyRef" refer="GarageKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule C6b. GarageCodeRef instances to a Garage must reference a local definition of a Garage element.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:GarageRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="RouteKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I1a. id of each Route must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Routes/txc:Route"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="RouteKeyRef" refer="RouteKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I1b. RouteRef instances must reference a local definition of a Route.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RouteRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="RoutePrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U4a. PrivateCodes of   Route declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Routes/txc:Route"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="AnyJourneyPatternKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I2a. id of each JourneyPattern must be unique within document. </xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Service/txc:StandardService/txc:JourneyPattern|.//txc:Service/txc:FlexibleService/txc:FlexibleJourneyPattern"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="AnyJourneyPatternKeyRef" refer="AnyJourneyPatternKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I2b. JourneyPatternRef  instances must reference a local definition of a JourneyPattern or FlexibleJourneyPattern.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternRef|.//txc:FlexibleJourneyPatternRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="AnyJourneyPatternPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U5a. PrivateCodes of   JourneyPatterns  must be unique within document</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Service/txc:StandardService/txc:JourneyPattern|.//txc:Service/txc:FlexibleService/txc:FlexibleJourneyPattern"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="LineKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I5a. id of each Line must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Lines/txc:Line"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="LineKeyRef" refer="LineKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I5b. LineRef instances must refer to a local definition of a Line element.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:LineRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="RouteSectionKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I6a. id of each RouteSection must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RouteSections/txc:RouteSection"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="RouteSectionKeyRef" refer="RouteSectionKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I6b. RouteSectionRef instances must refer to a local definition of a RouteSection.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RouteSectionRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="JourneyPatternSectionKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I7a. id of each JourneyPatternSection must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternSections/txc:JourneyPatternSection"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="JourneyPatternSectionKeyRef" refer="JourneyPatternSectionKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I7b. JourneyPatternSectionRef instances must refer to a local definition of a JourneyPatternSection</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternSectionRefs"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="RouteLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I8a. id of each RouteLink must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RouteSection/txc:RouteLink"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="RouteLinkKeyRef" refer="RouteLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I8b. iRouteLinkRef instances must reference a local definition of a RouteLink.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RouteLinkRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="JourneyPatternTimingLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I9a. id of each JourneyPatternTimingLink must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternTimingLink"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="JourneyPatternTimingLinkKeyRef" refer="JourneyPatternTimingLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I9b. JourneyPatternRef instances must reference a local definition of a JourneyPatternTimingLink.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternTimingLinkRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="VehicleJourneyTimingLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I10a. id of each VehicleJourneyTimingLink must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneyTimingLink"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="VehicleJourneyTimingLinkKeyRef" refer="VehicleJourneyTimingLinkKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I10b. VehicleJourneyRef instances must reference a local definition of a VehicleJourneyTimingLink</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneyTimingLinkRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="JourneyPatternTimingLinkStopUsageKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I11a. id of each VehicleJourneyStopUsage must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternTimingLink/txc:From|.//txc:JourneyPatternTimingLink/txc:To"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="JourneyPatternTimingLinkStopUsageKeyRef" refer="JourneyPatternTimingLinkStopUsageKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I11b. JourneyPatternStopUsageRef instances must refer to a local definition of a JourneyPatternStopUsage.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Inbound/txc:StopUsageRef|.//txc:Outbound/txc:StopUsageRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="VehicleJourneyTimingLinkStopUsageKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I12a. id of each VehicleJourneyStopUsage must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:VehicleJourneyTimingLink/txc:From|.//txc:VehicleJourneyTimingLink/txc:To"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:unique name="JourneyPatternInterchangeKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I13. id of each JourneyPatternInterchange must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Service/txc:JourneyPatternInterchange"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="JourneyPatternInterchangeKeyRef" refer="JourneyPatternInterchangeKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I13. JourneyPatternInterchangeRef instances must refer to a local definition of a JourneyPatternInterchange</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:JourneyPatternInterchangeRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="VehicleJourneyInterchangeKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I14. id of each VehicleJourneyInterchange must be unique  within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//VehicleJourneyInterchange"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:unique name="AnyOperatorIdKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I16a id of each Operator  must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Operators/txc:Operator|.//txc:Operators/txc:LicensedOperator"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:unique name="AnyOperatorCodeKey">
			<xsd:annotation>
				<xsd:documentation>Integrity Ruile C7a. Codes of  Operator  declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Operators/txc:Operator|.//txc:Operators/txc:LicensedOperator"/>
			<xsd:field xpath="txc:OperatorCode"/>
		</xsd:unique>
		<xsd:keyref name="AnyOperatorIdKeyRef" refer="AnyOperatorIdKey">
			<xsd:annotation>
				<xsd:documentation>Integrity Ruile C16b. OperatorIdRef instances must refer to a local definition of a Operator.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:OperatorIdRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:unique name="LicensedOperatorIdKey">
			<xsd:annotation>
				<xsd:documentation>Integrity Ruile C17a. Codes of Licencesed Operator  declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Operators/txc:LicensedOperator"/>
			<xsd:field xpath="@id"/>
			<!-- This constraint is for registration only -->
		</xsd:unique>
		<xsd:keyref name="RegisteredOperatorIdKeyRef" refer="LicensedOperatorIdKey">
			<xsd:annotation>
				<xsd:documentation>Integrity Rile C17b. RegistteredOperatorIdRef instances must refer to a local definition of a Operator.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:RegisteredOperatorRef"/>
			<xsd:field xpath="."/>
			<!-- This constraint is for registration only -->
		</xsd:keyref>
		<xsd:unique name="OperatorPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U7a. PrivateCodes of   Operator declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Operators/txc:Operator |.//txc:Operators/txc:LicencedOperator"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="JourneyGroupingPrivateKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule U9a. PrivateCodes of   JourneyGrouping declarations must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:Services/txc:Service /txc:JourneyGrouping"/>
			<xsd:field xpath="txc:PrivateCode"/>
		</xsd:unique>
		<xsd:unique name="DataRightKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I18a. id of each DataRight must be unique within document.</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:DataRight"/>
			<xsd:field xpath="@id"/>
		</xsd:unique>
		<xsd:keyref name="DataRightKeyRef" refer="DataRightKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I18b. DataRightRef instances must refer to a local definition of a DataRight</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath=".//txc:DataRightRef"/>
			<xsd:field xpath="."/>
		</xsd:keyref>
		<xsd:keyref name="DataRightAttributeKeyRef" refer="DataRightKey">
			<xsd:annotation>
				<xsd:documentation>Internal Integrity Rule I18b. DataRightRef instances must refer to a local definition of a DataRight</xsd:documentation>
			</xsd:annotation>
			<xsd:selector xpath="*"/>
			<xsd:field xpath="@DataRightRef"/>
		</xsd:keyref>
	</xsd:element>
</xsd:schema>
