<?xml version="1.0" encoding="UTF-8"?>
<!-- target namespace is a URL by popular convention. It is an idenfitier 
	only, such that no pysical resource is required at this URL. -->
<schema targetNamespace="http://www.for.gov.bc.ca/schema/rrs" xmlns:rrs="http://www.for.gov.bc.ca/schema/rrs" xmlns:mof="http://www.for.gov.bc.ca/schema/base" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1">
	<annotation>
		<documentation>BC MOF rrs Submission schema for use in the Electronic Submission Framework. Copyright (c) 2003 BC Ministry of Forests, All Rights Reserved.
		</documentation>
	</annotation>
	<!-- import MOF Base constructs -->
	<include schemaLocation="mof-rrs-include.xsd" />
	<import namespace="http://www.for.gov.bc.ca/schema/base" schemaLocation="mof-base.xsd" />
	<!-- import constructs from the GML Feature and Geometry schemas -->
	<import namespace="http://www.opengis.net/gml" />
	<import namespace="http://www.w3.org/1999/xlink" />
	<!-- ========================= Submission Types ================================================ -->
	<!-- ========================= RoadTenureApplication Feature Collection ===================== -->
	<element name="RoadTenureApplication"	type="rrs:RoadTenureApplicationType"	substitutionGroup="rrs:_RRSSubmissionFeature" />
	<complexType name="RoadTenureApplicationType">
		<annotation>
			<documentation>This type is a FeatureCollection, since it is a container for RoadSection Features. Since a FeatureCollection is itself a Feature, instances of this type may have an identity (fid), as well as properties with both simple and complex content. Used to submit applications or amendments to road permits or FSR’s.
			</documentation>
		</annotation>
		<complexContent>
			<extension base="rrs:AbstractRRSFeatureCollectionBaseType">
				<sequence>
					<element ref="rrs:forestFileID" minOccurs="0" />
					<element ref="rrs:fileType" minOccurs="0" />
					<element ref="rrs:applicationDescription" />
					<element ref="rrs:location" minOccurs="0" />
					<element ref="rrs:district" />
					<element ref="rrs:managementUnitType" minOccurs="0" />
					<element ref="rrs:managementUnitID" minOccurs="0" />
					<element name="associatedSubmission"  type="mof:AlphaNumeric100" minOccurs="0" />
					<element ref="rrs:applicationPurpose" />
					<element name="amendmentNumber" type="mof:AlphaNumeric10" minOccurs="0" />
					<element ref="rrs:bCTSOffice" minOccurs="0" />
					<element name="roadSectionMember"	type="rrs:RoadSectionAssociationType" maxOccurs="unbounded" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="RoadSectionAssociationType">
		<annotation>
			<documentation>Association to a RoadSection Feature. Also removes the
				Xlink attributes which are not required nor supported.
			</documentation>
		</annotation>
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence>
					<element ref="rrs:RoadSection" />
				</sequence>
			</restriction>
		</complexContent>
	</complexType>
	<!-- ========================= RoadSection Feature ============================================= -->
	<element name="RoadSection" type="rrs:RoadSectionType" />
	<complexType name="RoadSectionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element ref="mof:spatialMetaData" minOccurs="0" />
					<element name="roadSectionID" type="mof:AlphaNumeric30" />
					<element name="roadName" type="mof:AlphaNumeric20" minOccurs="0" />
					<element name="associatedTenurePermit"  type="mof:AlphaNumeric100" minOccurs="0" />
					<element ref="rrs:applicationPurpose" />
					<element name="tenureWidth" type="mof:NonNegativeInteger3D" minOccurs="0" />
					<element name="variableWidthReason" type="mof:AlphaNumeric100" minOccurs="0" />
					<element name="adjudicationComment" type="mof:AlphaNumeric2000" minOccurs="0" />
					<element name="amendmentStartStation" type="mof:Decimal11D4d" minOccurs="0" />
					<element name="amendmentEndStation" type="mof:Decimal11D4d" minOccurs="0" />
					<element name="amendmentType" type="mof:AlphaNumeric3" minOccurs="0" />
					<element ref="rrs:centreLineOf" minOccurs="0" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ========================= Real Property Project Collection ===================== -->
	<element name="RealPropertyProject" type="rrs:RealPropertyProjectType" substitutionGroup="rrs:_RRSSubmissionFeature" />
	<complexType name="RealPropertyProjectType">
		<annotation>
			<documentation>This is a container for Real Property Project features
			</documentation>
		</annotation>
		<complexContent>
			<extension base="rrs:AbstractRRSFeatureCollectionBaseType">
				<sequence>
					<element ref="rrs:forestFileID" minOccurs="0" />
					<element ref="rrs:applicationPurpose" />
					<element name="rppProjectNumber" type="mof:AlphaNumeric30" minOccurs="0" />
					<element name="projectTypeCode" type="mof:AlphaNumeric10" minOccurs="0" />
					<element name="agencyID" type="mof:AlphaNumeric25" minOccurs="0" />
					<element name="projectName" type="mof:AlphaNumeric30" minOccurs="0" />
					<element name="projectStartDate" type="date" minOccurs="0" />
					<element name="projectEndDate" type="date" minOccurs="0" />
					<element ref="rrs:comment" minOccurs="0" />
					<element ref="mof:spatialMetaData" minOccurs="0" />
					<element ref="rrs:extentOf" minOccurs="0" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ========================= Special Access Road - Linear Feature Collection 	===================== -->
	<element name="SpecialAccessRoadLinear" type="rrs:SpecialAccessRoadLinearType" substitutionGroup="rrs:_RRSSubmissionFeature" />
	<complexType name="SpecialAccessRoadLinearType">
		<annotation>
			<documentation>This is a container for Linear Special Access Road
				features. This includes FSR - Declarations, FSR Gazettes Unsurveyed,
				and NSR</documentation>
		</annotation>
		<complexContent>
			<extension base="rrs:AbstractRRSFeatureCollectionBaseType">
				<sequence>
					<element ref="rrs:forestFileID" minOccurs="0" />
					<element ref="rrs:specialAccessRoadLinearType" />
					<element ref="rrs:applicationPurpose" />
					<element name="bctsFundedInd" type="boolean" minOccurs="0" />
					<element ref="rrs:orgUnitGeo" minOccurs="0" />
					<element name="orgUnitBCTS" type="mof:AlphaNumeric3" minOccurs="0" />
					<element name="specialAccessRoadSectionMember" type="rrs:SpecialAccessRoadSectionAssociationType" maxOccurs="unbounded" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="SpecialAccessRoadSectionAssociationType">
		<annotation>
			<documentation>Association to a RoadSection Feature. Also removes the
				Xlink attributes which are not required nor supported.
			</documentation>
		</annotation>
		<complexContent>
			<restriction base="gml:FeatureAssociationType">
				<sequence>
					<element ref="rrs:SpecialAccessRoadSection" />
				</sequence>
			</restriction>
		</complexContent>
	</complexType>
	<!-- ========================= Special Access Road Section Feature ============================================= -->
	<element name="SpecialAccessRoadSection" type="rrs:SpecialAccessRoadSectionType" />
	<complexType name="SpecialAccessRoadSectionType">
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<element name="sectionID" type="mof:AlphaNumeric10" />
					<element ref="rrs:applicationPurpose" />
					<element name="roadNameLegal" type="mof:AlphaNumeric50" minOccurs="0" />
					<element name="roadNameCommon" type="mof:AlphaNumeric50" minOccurs="0" />
					<element ref="rrs:comment" minOccurs="0" />
					<element name="waterShedCode" type="mof:AlphaNumeric10" minOccurs="0" />
					<element ref="mof:spatialMetaData" minOccurs="0" />
					<element ref="rrs:centreLineOf" minOccurs="0" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ========================= SpecialAccessRoad - Polygonal Feature Collection 	===================== -->
	<element name="SpecialAccessRoadPolygonal" type="rrs:SpecialAccessRoadPolygonalType" substitutionGroup="rrs:_RRSSubmissionFeature" />
	<complexType name="SpecialAccessRoadPolygonalType">
		<annotation>
			<documentation>This is a container for Polygonal Special Access Road
				features. This includes FSR - Dedications, FSR Gravel Pits
			</documentation>
		</annotation>
		<complexContent>
			<extension base="rrs:AbstractRRSFeatureCollectionBaseType">
				<sequence>
					<element ref="rrs:forestFileID" />
					<element ref="rrs:specialAccessRoadPolygonalType" />
					<element ref="rrs:applicationPurpose" />
					<element name="bctsFundedInd" type="boolean" minOccurs="0" />
					<element ref="rrs:orgUnitGeo" minOccurs="0" />
					<element name="orgUnitBCTS" type="mof:AlphaNumeric3" minOccurs="0" />
					<element name="roadNameLegal" type="mof:AlphaNumeric50" minOccurs="0" />
					<element name="roadNameCommon" type="mof:AlphaNumeric50" minOccurs="0" />
					<element ref="rrs:comment" minOccurs="0" />
					<element name="dedicationPlanID" type="mof:AlphaNumeric30" minOccurs="0" />
					<element name="dedicationDate" type="date" minOccurs="0" />
					<element name="gpNumber" type="mof:NonNegativeInteger4D" minOccurs="0" />
					<element name="waterShedCode" type="mof:AlphaNumeric10" minOccurs="0" />
					<element ref="mof:spatialMetaData" minOccurs="0" />
					<element ref="rrs:extentOf" minOccurs="0" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
</schema>
