<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://lpis.jrc.ec.europa.eu/registry/cbm/1.1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:cap="http://lpis.jrc.ec.europa.eu/registry/cbm/1.1.0" elementFormDefault="qualified" version="1.0">
	<xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
	<xs:include schemaLocation="CbmCommonTypes.xsd"/>
	<xs:element name="FeatureCollection" type="cap:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection">
		<xs:unique name="unique_foiID">
			<xs:selector xpath="gml:featureMember/cap:featureOfInterest"/>
			<xs:field xpath="cap:foiID"/>
		</xs:unique>
		<xs:unique name="unique_ordinalNumber">
			<xs:selector xpath="gml:featureMember/cap:featureOfInterest"/>
			<xs:field xpath="cap:ordinalNumber"/>
		</xs:unique>
	</xs:element>
	<xs:complexType name="FeatureCollectionType">
		<xs:complexContent>
			<xs:extension base="gml:AbstractFeatureCollectionType">
				<xs:attributeGroup ref="cap:CbMReportIdentificationAttributeGroup"/>				
				<xs:attribute name="lockId" type="xs:string" use="optional"/>
				<xs:attribute name="scope" type="xs:string" use="optional"/>
				<xs:attribute name="sampleSize" type="xs:integer" use="required"/>
				<xs:attribute name="samplePreselectionSize" type="xs:integer" use="required"/>
				<xs:attribute name="samplePreselectionCreationDate" type="xs:date" use="required"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="featureOfInterest" type="cap:featureOfInterest_Type" substitutionGroup="gml:_Feature"/>
	<xs:complexType name="featureOfInterest_Type">
		<xs:complexContent>
			<xs:extension base="gml:AbstractFeatureType">
				<xs:sequence>
					<xs:element name="geometryProperty" type="gml:GeometryPropertyType"/>
					<xs:element name="foiID" type="cap:restr_minLength_string"/>
					<xs:element name="ordinalNumber">
						<xs:simpleType>
							<xs:restriction base="xs:integer">
								<xs:minInclusive value="1"/>
								<xs:maxInclusive value="1095"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="restr_minLength_string">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>	
</xs:schema>
