<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:core="http://www.govtalk.gov.uk/core" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" id="netex_relationship">
	<xsd:include schemaLocation="netex_relationship_support.xsd"/>
	<xsd:annotation>
		<xsd:appinfo>
			<Metadata xmlns="http://www.govtalk.gov.uk/CM/gms-xs">
				<Aggregation>main schema</Aggregation>
				<Audience>e-service developers</Audience>
				<Coverage>Europe</Coverage>
				<Creator>First Drafted for version 1.0 CEN TC278 WG3 SG6 Editor Nicholas Knowles.</Creator>
				<Date>
					<Created>2010-09-04</Created>
				</Date>
				<Date>
					<Modified>2014-03-31</Modified>
				</Date>
				<Date><Modified>2019-03-02</Modified>Correction to comment. No material change.
				</Date>
				<Date><Modified>2019-04-15</Modified>Fix Add typesOfValue_refs to enable type of Frame
				</Date>
				<Description>
					<p>NeTEx Network Exchange - This subschema defines NeTEx relationship types.</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.netex.org.uk/schemas/1.0/xsd/netex_framework/netex_responsibility}netex_relationship.xsd</Identifier>
				<Language>[ISO 639-2/B] ENG</Language>
				<Publisher>Kizoom Software Ltd, 16 High Holborn, London WC1V 6BX</Publisher>
				<Rights>Unclassified
					 <Copyright>CEN, Crown Copyright 2009-2019</Copyright>
				</Rights>
				<Source>
					<ul>
						<li>Created for NeTEx.</li>
					</ul>
				</Source>
				<Status>Version 1.0</Status>
				<Subject>
					<Category>Arts, recreation and travel, Tourism, Travel (tourism), Transport,
Air transport, Airports,
Ports and maritime transport, Ferries (marine),
Public transport, Bus services, Coach services, Bus stops and stations,
Rail transport, Railway stations and track, Train services, Underground trains,
Business and industry, Transport, Air transport , Ports and maritime transport, Public transport,
Rail transport, Roads and Road transport
</Category>
					<Project>CEN TC278 WG3 SG9.</Project>
				</Subject>
				<Title>NeTEx Network Exchange - VERSION types.</Title>
				<Type>Standard</Type>
			</Metadata>
		</xsd:appinfo>
		<xsd:documentation>NeTEx reifications of relationships used for one to many relationships.</xsd:documentation>
	</xsd:annotation>
	<!-- ======================================================================= -->
	<xsd:simpleType name="ModificationSetEnumeration">
		<xsd:annotation>
			<xsd:documentation>Classification of modification as addition, deletion, revision or delta only. Enumerated value.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:NMTOKEN">
			<xsd:enumeration value="all">
				<xsd:annotation>
					<xsd:documentation>This incldues definitions of one ore more new entities.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="changesOnly">
				<xsd:annotation>
					<xsd:documentation>This is just the modifications (addition, revision, deletion); entities which are unchanged are omitted.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- ======================================================================= -->
	<xsd:complexType name="objectRefs_RelStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a list of references to an NeTEx Object.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="oneToManyRelationshipStructure">
				<xsd:sequence>
					<xsd:element ref="VersionOfObjectRef" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- =====TYPE OF VALUE ============================================== -->
	<xsd:element name="TypeOfValueRef" type="TypeOfValueRefStructure" abstract="true" substitutionGroup="VersionOfObjectRef">
		<xsd:annotation>
			<xsd:documentation>Reference to a TYPE OF VALUE. Implementation of a one to one relationship by reference to TYPE OF VALUE.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="TypeOfValueRefStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a reference to a TYPE OF VALUE.</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:restriction base="VersionOfObjectRefStructure">
				<xsd:attribute name="ref" type="TypeOfValueIdType" use="required">
					<xsd:annotation>
						<xsd:documentation>Identifier of a TYPE OF VALUE.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="nameOfRefClass" type="NameOfClassTypeOfValueRefStructureType">
					<xsd:annotation>
						<xsd:documentation>Automatic reference class for TypeOfValueRefStructure</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="modification" type="ModificationEnumeration" use="optional">
					<xsd:annotation>
						<xsd:documentation>Nature of last modification: new, revise, delete, unchanged.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="versionRef" type="VersionIdType" use="optional">
					<xsd:annotation>
						<xsd:documentation>Identifier of version of referenced entity. For use when reference is External and a specific version is required. Mutually exclusive with version</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="uri" type="xsd:anyURI" use="optional">
					<xsd:annotation>
						<xsd:documentation>Location of the external entity. +v2.0</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attributeGroup ref="ReferenceModificationDetailsGroup"/>
			</xsd:restriction>
		</xsd:simpleContent>
	</xsd:complexType>
	<!-- ======================================================================= -->
	<xsd:complexType name="typeOfEntityRefs_RelStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a list of references to a TYPE OF VALUE</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="oneToManyRelationshipStructure">
				<xsd:sequence>
					<xsd:element ref="TypeOfEntityRef" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="TypeOfEntityRef" type="TypeOfValueRefStructure" abstract="true" substitutionGroup="TypeOfValueRef">
		<xsd:annotation>
			<xsd:documentation>Reference to a TYPE OF ENTITY.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- =====Metamodel references================================================ -->
	<xsd:simpleType name="RelationshipId">
		<xsd:annotation>
			<xsd:documentation>Type for Identifier of a relationship.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="NameOfClass"/>
	</xsd:simpleType>
	<xsd:element name="RelationshipRef" type="RelationshipRefStructure">
		<xsd:annotation>
			<xsd:documentation>Reference to a Relationship.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="RelationshipRefStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a reference to a Relationship.</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="xsd:string">
				<xsd:attribute name="nameOfClass" type="RelationshipId" use="required">
					<xsd:annotation>
						<xsd:documentation>Name of referenced Class.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>
	<!-- ==== Meta model ================================================================ -->
	<xsd:simpleType name="ContainmentEnumeration">
		<xsd:annotation>
			<xsd:documentation>Classification of containment.</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:NMTOKEN">
			<xsd:enumeration value="inline">
				<xsd:annotation>
					<xsd:documentation>This is a definition of a new entity.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="byReference">
				<xsd:annotation>
					<xsd:documentation>This is a deletion of an existing entity.</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="byVersionedReference"/>
			<xsd:enumeration value="both"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="relationshipStructure">
		<xsd:annotation>
			<xsd:documentation>Abstract Type for a serialisation of a NeTEx relationship.</xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="id" type="RelationshipId">
			<xsd:annotation>
				<xsd:documentation>Identifier of the relationship.</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:complexType name="oneToManyRelationshipStructure">
		<xsd:annotation>
			<xsd:documentation>Type for an Implementation of a one to many relationship . A one to many relationship from the source (one) to the target (many)</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="relationshipStructure">
				<xsd:attribute name="modificationSet" type="ModificationSetEnumeration" default="all">
					<xsd:annotation>
						<xsd:documentation>Whether this is a list of all (revise) or just changes.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="containmentAggregationStructure">
		<xsd:annotation>
			<xsd:documentation>Type for an Implementation of an aggregate relationship by reference or value, where the contained element or reference is included in the XML as a child of the parent.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="relationshipStructure">
				<xsd:attribute name="modificationSet" type="ModificationSetEnumeration" default="all">
					<xsd:annotation>
						<xsd:documentation>Whether this is a list of all (revise) or just changes.</xsd:documentation>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="strictContainmentAggregationStructure">
		<xsd:annotation>
			<xsd:documentation>Type for an Implementation of a strict aggregate relationship by value, where the contained element is a child of the parent. A one to many relationship from the source, the containing parent, to the child instance.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="relationshipStructure"/>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="frameContainmentStructure">
		<xsd:annotation>
			<xsd:documentation>Type for an implementation of a frame containment relationship (ENTITY IN FRAME IN VERSION) A one to many relationship from the containing parent (one) to the contained child (many)</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="relationshipStructure"/>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- =====Metamodel references================================================ -->
	<xsd:complexType name="classRefs_RelStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a list of Classes.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="oneToManyRelationshipStructure">
				<xsd:sequence>
					<xsd:element ref="ClassRef" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:complexType name="ClassInFrameRefs_RelStructure">
		<xsd:annotation>
			<xsd:documentation>Type for a list of Class Filter references.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="oneToManyRelationshipStructure">
				<xsd:sequence>
					<xsd:element ref="ClassInFrameRef" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
</xsd:schema>
