<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:osgb="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb" targetNamespace="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.17">
	<annotation>
		<appinfo>OSComplexTypes.xsd 3.17 2014/04/04</appinfo>
		<documentation xml:lang="en">Ordnance Survey, (c) Crown Copyright. All Rights Reserved April 2014</documentation>
		<documentation xml:lang="en">See http://www.ordnancesurvey.co.uk/xml/schema for guidelines and related information</documentation>
		<documentation xml:lang="en">This schema defines the complex types used as properties on features.</documentation>
	</annotation>
	<!-- include constructs from other OS schemas -->
	<include schemaLocation="OSSimpleTypes.xsd"/>
	<include schemaLocation="OSMeasures.xsd"/>
	<include schemaLocation="OSGeometryTopology.xsd"/>
	<!--import OGC constructs-->
	<!-- EDIT : ADDED schemaLocation attribute to enable validation 2014-04-04 -->
	<import namespace="http://www.opengis.net/gml" schemaLocation="feature.xsd"/>
	<import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
	<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
	<!-- ================================================================
	Global element Declarations 
	================================================================ -->
	<!-- collection type -->
	<element name="FeatureCollection" type="osgb:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/>
	<element name="_featureMember" type="gml:FeatureAssociationType" abstract="true" substitutionGroup="gml:featureMember"/>
	<!-- ================================================================
	Complex Type Definitions 
	================================================================ -->
	<!-- query collection -->
	<complexType name="FeatureCollectionType">
		<complexContent>
			<extension base="gml:AbstractFeatureCollectionType">
				<sequence>
					<element name="queryTime" type="dateTime"/>
					<element name="queryExtent" type="gml:GeometryPropertyType" minOccurs="0"/>
					<element name="queryChangeSinceDate" type="date" minOccurs="0"/>
					<element ref="osgb:_featureMember" minOccurs="0" maxOccurs="unbounded"/>
					<element name="boundedBy" type="gml:BoundingShapeType" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="addressAuthorityType">
		<sequence minOccurs="0">
			<element name="CT_UARN" type="string" minOccurs="0"/>
			<element name="NDR_UARN" type="string" minOccurs="0"/>
			<element name="UDPRN" type="int" minOccurs="0"/>
			<element name="UMRRN" type="int" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="addressIdType">
		<sequence minOccurs="0">
			<element name="addressKey" type="int" minOccurs="0"/>
			<element name="organisationKey" type="int" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="addressReferenceType">
		<complexContent>
			<extension base="gml:FeatureAssociationType">
				<attribute name="version" type="integer" use="optional"/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="addressStatusType">
		<sequence>
			<element name="matchStatus" type="osgb:matchStatusType" minOccurs="0"/>
			<element name="physicalStatus" type="osgb:physicalStatusType" minOccurs="0"/>
			<element name="positionalQuality" type="osgb:positionalQualityType"/>
			<element name="structureType" type="osgb:structureTypeType" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="aliasAddressType">
		<sequence>
			<element name="alsoKnownAs" type="string" minOccurs="0"/>
			<element name="buildingName" type="string" minOccurs="0"/>
			<element name="department" type="string" minOccurs="0"/>
			<element name="organisationDescription" type="string" minOccurs="0"/>
			<element name="organisationAtResidential" type="string" minOccurs="0"/>
			<element name="tradingName" type="string" minOccurs="0"/>
			<element name="welshAlternative" type="string" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="alternativeAddressType">
		<sequence>
			<element name="subBuildingName" type="string" minOccurs="0"/>
			<element name="buildingName" type="string" minOccurs="0"/>
			<element name="buildingNumber" type="string" minOccurs="0"/>
			<element name="dependentThoroughfare" type="string" minOccurs="0"/>
			<element name="thoroughfare" type="string" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="bs7666AttributeType">
		<sequence>
			<element name="saon" type="string" minOccurs="0"/>
			<element name="paon" type="string" minOccurs="0"/>
			<element name="street" type="string" minOccurs="0"/>
			<element name="locality" type="string" minOccurs="0"/>
			<element name="town" type="string" minOccurs="0"/>
			<element name="adminArea" type="string" minOccurs="0"/>
			<element name="postCode" type="string" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="changeHistoryType">
		<sequence>
			<element name="changeDate" type="date"/>
			<element name="reasonForChange" type="osgb:reasonForChangeType"/>
		</sequence>
	</complexType>
	<group name="dateRange">
		<choice>
			<element name="namedDate" type="string"/>
			<element name="specifiedDate">
				<complexType>
					<sequence>
						<element name="startDate" type="gMonthDay"/>
						<element name="endDate" type="gMonthDay"/>
					</sequence>
				</complexType>
			</element>
		</choice>
	</group>
	<complexType name="dateTimeQualifierType">
		<choice>
			<element name="namedPeriod" type="string"/>
			<element name="specifiedPeriod" minOccurs="0">
				<complexType>
					<sequence>
						<group ref="osgb:dateRange" minOccurs="0" maxOccurs="unbounded"/>
						<element name="day" type="string" minOccurs="0" maxOccurs="unbounded"/>
						<group ref="osgb:timeRange" minOccurs="0" maxOccurs="unbounded"/>
					</sequence>
				</complexType>
			</element>
		</choice>
	</complexType>
	<complexType name="directedLinkAssociationType">
		<annotation>
			<documentation xml:lang="en">
	+ identifies that the relationship refers to the edge in its natural direction,
	i.e. the direction that the geometry is in.  - identifies that it is in the opposite 
	direction, i.e. the direction opposite to the geometric coordinates.
</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:FeatureAssociationType">
				<attribute name="orientation" type="osgb:signType" use="required"/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="directedNodeAssociationType">
		<complexContent>
			<extension base="gml:FeatureAssociationType">
				<attribute name="orientation" type="osgb:signType" use="optional"/>
				<attribute name="gradeSeparation" type="integer" use="optional" default="0"/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="environmentQualifierType">
		<sequence>
			<element name="instruction" minOccurs="0">
				<simpleType>
					<restriction base="string">
						<enumeration value="Access Limited To"/>
						<enumeration value="Mandatory Turn"/>
						<enumeration value="No Entry"/>
						<enumeration value="No Turn"/>
						<enumeration value="One Way"/>
						<enumeration value="Access Prohibited To"/>
					</restriction>
				</simpleType>
			</element>
			<element name="classification" type="string" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="heightAboveDatumType">
		<sequence>
			<element name="heightAboveDatum" type="double"/>
			<element name="accuracyOfHeightAboveDatum" type="osgb:accuracyOfPositionType"/>
		</sequence>
	</complexType>
	<complexType name="heightAboveGroundLevelType">
		<sequence>
			<element name="heightAboveGroundLevel" type="double"/>
			<element name="accuracyOfHeightAboveGroundLevel" type="osgb:accuracyOfPositionType"/>
		</sequence>
	</complexType>
	<complexType name="languageQualifiedString">
		<annotation>
			<documentation xml:lang="en">
	the xml:lang attribute specifies the language of the enclosed text according
	to the ISO 639-1 specification.
	en : English
	cy : Welsh
	gd : Gaelic; Scottish Gaelic.
</documentation>
		</annotation>
		<simpleContent>
			<extension base="string">
				<attribute ref="xml:lang" use="optional"/>
			</extension>
		</simpleContent>
	</complexType>
	<complexType name="ndrAddressType">
		<sequence>
			<element name="firm" type="string"/>
		</sequence>
	</complexType>
	<complexType name="nodeAssociationType">
		<complexContent>
			<extension base="gml:FeatureAssociationType">
				<attribute name="gradeSeparation" type="integer" use="optional" default="0"/>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="positionalQualityType">
		<simpleContent>
			<extension base="osgb:positionalQualityStringType">
				<attribute name="accuracy" type="osgb:positionalQualityAccuracyType"/>
			</extension>
		</simpleContent>
	</complexType>
	<complexType name="postalAddressType">
		<sequence>
			<element name="organisation" type="string" minOccurs="0"/>
			<element name="department" type="string" minOccurs="0"/>
			<element name="POBox" type="string" minOccurs="0"/>
			<element name="subBuildingName" type="string" minOccurs="0"/>
			<element name="plotNumber" type="string" minOccurs="0"/>
			<element name="buildingName" type="string" minOccurs="0"/>
			<element name="buildingNumber" type="string" minOccurs="0"/>
			<element name="dependentThoroughfare" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="thoroughfare" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="doubleDependentLocality" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="dependentLocality" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="postTown" type="osgb:languageQualifiedString"/>
			<element name="postCode" type="osgb:postCodeType"/>
			<element name="deliveryPointSuffix" type="osgb:deliveryPointSuffixType" minOccurs="0"/>
			<element name="addressId" type="osgb:addressIdType" minOccurs="0"/>
			<element name="welshAddress" type="osgb:welshAddressType" minOccurs="0"/>
		</sequence>
		<attribute name="nonGeographic" type="boolean" use="optional" default="false"/>
	</complexType>
	<complexType name="postCodeType">
		<simpleContent>
			<extension base="osgb:postCodeStringType">
				<attribute name="type" type="osgb:postCodeTypeType" use="optional" default="Small"/>
			</extension>
		</simpleContent>
	</complexType>
	<complexType name="textRenderingType">
		<sequence>
			<element name="anchorPosition" type="unsignedByte"/>
			<element name="font" type="unsignedByte"/>
			<element name="height" type="float"/>
			<element name="orientation" type="unsignedShort"/>
		</sequence>
	</complexType>
	<group name="timeRange">
		<choice>
			<element name="namedTime" type="string"/>
			<element name="specifiedTime">
				<complexType>
					<sequence>
						<element name="startTime" type="time"/>
						<element name="endTime" type="time"/>
					</sequence>
				</complexType>
			</element>
		</choice>
	</group>
	<complexType name="truePOBoxAddressType">
		<sequence>
			<element name="organisation" type="string" minOccurs="0"/>
			<element name="POBox" type="string"/>
			<element name="geographicAddress" type="string"/>
			<element name="postCode" type="string"/>
		</sequence>
	</complexType>
	<complexType name="vehicleQualifierType">
		<sequence>
			<element name="type" minOccurs="0" maxOccurs="unbounded">
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="exceptFor" type="boolean"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="load" minOccurs="0" maxOccurs="unbounded">
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="exceptFor" type="boolean"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="use" minOccurs="0" maxOccurs="unbounded">
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="exceptFor" type="boolean"/>
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="maxHeight" type="osgb:MetresMeasureType" minOccurs="0"/>
			<element name="maxCompositeHeight" type="osgb:ImperialMeasureType" minOccurs="0"/>
		</sequence>
	</complexType>
	<complexType name="welshAddressType">
		<sequence>
			<element name="dependentThoroughfare" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="thoroughfare" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="doubleDependentLocality" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="dependentLocality" type="osgb:languageQualifiedString" minOccurs="0"/>
			<element name="postTown" type="osgb:languageQualifiedString" minOccurs="0"/>
		</sequence>
	</complexType>
</schema>
