<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:osgb="http://namespaces.ordnancesurvey.co.uk/cmd/local/v1" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://namespaces.ordnancesurvey.co.uk/cmd/local/v1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<annotation>
		<appinfo>CMDFeatures.xsd 1.0 2009/05/12</appinfo>
		<documentation xml:lang="en">Ordnance Survey, (c) Crown Copyright. All Rights Reserved May 2009.</documentation>
		<documentation xml:lang="en">This schema defines the Contextual Map Data Product.</documentation>
	</annotation>
	<!-- include constructs from other OS schemas -->
	<include schemaLocation="CMDComplexTypes.xsd"/>
	<import namespace="http://www.opengis.net/gml" schemaLocation="feature.xsd"/>
	<!-- ================================================================
	Global element Declarations 
	================================================================ -->
	<!-- feature members-->
	<element name="roadCLineMember" type="osgb:RoadCLineMemberType" substitutionGroup="osgb:_featureMember"/>
	<element name="textMember" type="osgb:TextMemberType" substitutionGroup="osgb:_featureMember"/>
	<element name="pointMember" type="osgb:PointMemberType" substitutionGroup="osgb:_featureMember"/>
	<element name="lineMember" type="osgb:LineMemberType" substitutionGroup="osgb:_featureMember"/>
	<element name="areaMember" type="osgb:AreaMemberType" substitutionGroup="osgb:_featureMember"/>
	<!-- Abstract features -->
	<element name="_CMDFeature" type="osgb:AbstractFeatureType" abstract="true" substitutionGroup="gml:_Feature"/>
	<!-- features -->
	<element name="RoadCLine" type="osgb:RoadCLineType" substitutionGroup="osgb:_CMDFeature"/>
	<element name="Text" type="osgb:TextType" substitutionGroup="osgb:_CMDFeature"/>
	<element name="Point" type="osgb:PointType" substitutionGroup="osgb:_CMDFeature"/>
	<element name="Line" type="osgb:LineType" substitutionGroup="osgb:_CMDFeature"/>
	<element name="Area" type="osgb:AreaType" substitutionGroup="osgb:_CMDFeature"/>
	<!-- ==============================================================
	Type Declarations
	============================================================== -->
	<!-- member types -->
	<complexType name="RoadCLineMemberType">
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence minOccurs="0">
					<element ref="osgb:RoadCLine"/>
				</sequence>
				<attributeGroup ref="gml:AssociationAttributeGroup"/>
			</restriction>
		</complexContent>
	</complexType>
	<complexType name="TextMemberType">
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence minOccurs="0">
					<element ref="osgb:Text"/>
				</sequence>
				<attributeGroup ref="gml:AssociationAttributeGroup"/>
			</restriction>
		</complexContent>
	</complexType>
	<complexType name="PointMemberType">
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence minOccurs="0">
					<element ref="osgb:Point"/>
				</sequence>
				<attributeGroup ref="gml:AssociationAttributeGroup"/>
			</restriction>
		</complexContent>
	</complexType>
	<complexType name="LineMemberType">
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence minOccurs="0">
					<element ref="osgb:Line"/>
				</sequence>
				<attributeGroup ref="gml:AssociationAttributeGroup"/>
			</restriction>
		</complexContent>
	</complexType>
	<complexType name="AreaMemberType">
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence minOccurs="0">
					<element ref="osgb:Area"/>
				</sequence>
				<attributeGroup ref="gml:AssociationAttributeGroup"/>
			</restriction>
		</complexContent>
	</complexType>
	<!-- abstract types -->
	<group name="FeatureGroup">
		<annotation>
			<documentation xml:lang="en">
				This defines the properties common to all Ordnance Survey features.
			</documentation>
		</annotation>
		<sequence>
			<element name="featureCode" type="osgb:featureCodeType"/>
			<element name="featureDescription" type="osgb:featureDescriptionType"/>
		</sequence>
	</group>
	<complexType name="AbstractFeatureType">
		<annotation>
			<documentation xml:lang="en">
				Abstract base type for all ordnance survey features.  Extends the gml abstract
				feature in order to ensure compliance with GML.
			</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<group ref="osgb:FeatureGroup"/>
			</extension>
		</complexContent>
	</complexType>
	<!-- features -->
	<complexType name="TextType">
		<complexContent>
			<extension base="osgb:AbstractFeatureType">
				<sequence>
					<element name="textRendering" type="osgb:textRenderingType"/>
					<element name="textString" type="string"/>
					<element name="anchorPoint" type="gml:PointPropertyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RoadCLineType">
		<complexContent>
			<extension base="osgb:AbstractFeatureType">
				<sequence>
					<element name="roadNumber" type="string" minOccurs="0"/>
					<element name="roadName" type="string" minOccurs="0"/>
					<element name="polyline" type="gml:LineStringPropertyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="AreaType">
		<complexContent>
			<extension base="osgb:AbstractFeatureType">
				<sequence>
					<element name="polygon" type="gml:PolygonPropertyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="LineType">
		<complexContent>
			<extension base="osgb:AbstractFeatureType">
				<sequence>
					<element name="polyline" type="gml:LineStringPropertyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="PointType">
		<complexContent>
			<extension base="osgb:AbstractFeatureType">
				<sequence>
					<element name="orientation" type="osgb:orientationType"/>
					<element name="point" type="gml:PointPropertyType"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
</schema>
