<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" targetNamespace="http://www.opengis.net/gml" elementFormDefault="qualified" version="3.0.0" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
    <annotation>
        <appinfo source="urn:opengis:specification:gml:schema-xsd:feature:v3.0.0"/>
        <documentation>GML Feature schema. 		      
     		      Copyright (c) 2001-2002 OGC, All Rights Reserved.</documentation>
    </annotation>
    <include schemaLocation="geometryBasic2d.xsd"/>
    <include schemaLocation="temporal.xsd"/>
    <element name="_Feature" type="gml:AbstractFeatureType" abstract="true" substitutionGroup="gml:_GML" nillable="false"/>
    <complexType name="AbstractFeatureType" abstract="true" mixed="false">
        <annotation>
            <documentation>An abstract feature provides a set of common properties, including id, metaDataProperty, name and description inherited from AbstractGMLType, plus boundedBy.    A concrete feature type must derive from this type and specify additional  properties in an application schema. A feature must possess an identifying attribute ('id' - 'fid' has been deprecated).</documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:boundedBy" minOccurs="0" maxOccurs="1" nillable="false"/>
                    <element ref="gml:location" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attribute name="fid" type="string" use="optional">
                    <annotation>
                        <appinfo>deprecated</appinfo>
                        <documentation>deprecated in GML version 3.0</documentation>
                    </annotation>
                </attribute>
            </extension>
        </complexContent>
    </complexType>
    <element name="featureMember" type="gml:FeaturePropertyType" nillable="false" abstract="false"/>
    <element name="featureProperty" type="gml:FeaturePropertyType" nillable="false" abstract="false"/>
    <complexType name="FeaturePropertyType" mixed="false" abstract="false">
        <annotation>
            <documentation>Container for a feature - follow gml:AssociationType pattern.</documentation>
        </annotation>
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:_Feature" minOccurs="0" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
    </complexType>
    <element name="featureMembers" type="gml:FeatureArrayPropertyType" nillable="false" abstract="false"/>
    <complexType name="FeatureArrayPropertyType" mixed="false" abstract="false">
        <annotation>
            <documentation>Container for features - follow gml:ArrayAssociationType pattern.</documentation>
        </annotation>
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:_Feature" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
        </sequence>
    </complexType>
    <complexType name="BoundedFeatureType" abstract="true" mixed="false">
        <annotation>
            <documentation>Makes boundedBy mandatory - used to build Feature Collections</documentation>
        </annotation>
        <complexContent>
            <restriction base="gml:AbstractFeatureType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:description" minOccurs="0" maxOccurs="1" nillable="false"/>
                    <element ref="gml:name" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:boundedBy" minOccurs="1" maxOccurs="1" nillable="false"/>
                    <element ref="gml:location" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>
    <element name="_FeatureCollection" type="gml:AbstractFeatureCollectionType" abstract="true" substitutionGroup="gml:_Feature" nillable="false"/>
    <complexType name="AbstractFeatureCollectionType" abstract="true" mixed="false">
        <annotation>
            <documentation>A feature collection contains zero or more features.</documentation>
        </annotation>
        <complexContent>
            <extension base="gml:BoundedFeatureType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:featureMember" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:featureMembers" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <element name="FeatureCollection" type="gml:FeatureCollectionType" substitutionGroup="gml:_Feature" nillable="false" abstract="false"/>
    <complexType name="FeatureCollectionType" mixed="false" abstract="false">
        <annotation>
            <documentation>Concrete generic feature collection.</documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureCollectionType"/>
        </complexContent>
    </complexType>
    <element name="boundedBy" type="gml:BoundingShapeType" nillable="false" abstract="false"/>
    <complexType name="BoundingShapeType" mixed="false" abstract="false">
        <annotation>
            <documentation>Bounding shape.</documentation>
        </annotation>
        <sequence minOccurs="1" maxOccurs="1">
            <group ref="gml:boundingShape" minOccurs="1" maxOccurs="1"/>
        </sequence>
    </complexType>
    <group name="boundingShape">
        <choice>
            <element ref="gml:Envelope" minOccurs="1" maxOccurs="1" nillable="false"/>
            <element ref="gml:Null" minOccurs="1" maxOccurs="1" nillable="false"/>
        </choice>
    </group>
    <element name="Box" type="gml:EnvelopeType" substitutionGroup="gml:Envelope" nillable="false" abstract="false">
        <annotation>
            <appinfo>deprecated</appinfo>
            <documentation>deprecated with GML version 3.0</documentation>
        </annotation>
    </element>
    <element name="EnvelopeWithTimePeriod" type="gml:EnvelopeWithTimePeriodType" substitutionGroup="gml:Envelope" nillable="false" abstract="false"/>
    <complexType name="EnvelopeWithTimePeriodType" mixed="false" abstract="false">
        <annotation>
            <documentation>Envelope that includes also a temporal extent.</documentation>
        </annotation>
        <complexContent>
            <extension base="gml:EnvelopeType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:timePosition" minOccurs="2" maxOccurs="2" nillable="false"/>
                </sequence>
                <attribute name="frame" type="anyURI" use="optional" default="#ISO-8601"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="location" type="gml:LocationPropertyType" substitutionGroup="gml:_property" nillable="false" abstract="false"/>
    <complexType name="LocationPropertyType" mixed="false" abstract="false">
        <annotation>
            <documentation>generalised locator property  - follow gml:AssociationType pattern</documentation>
        </annotation>
        <sequence minOccurs="1" maxOccurs="1">
            <group ref="gml:locator" minOccurs="0" maxOccurs="1"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
    </complexType>
    <group name="locator">
        <choice>
            <element ref="gml:_Geometry" minOccurs="1" maxOccurs="1" nillable="false"/>
            <element ref="gml:LocationKeyWord" minOccurs="1" maxOccurs="1" nillable="false"/>
            <element ref="gml:LocationString" minOccurs="1" maxOccurs="1" nillable="false"/>
        </choice>
    </group>
    <element name="LocationKeyWord" type="gml:CodeType" nillable="false" abstract="false"/>
    <element name="LocationString" type="gml:StringOrRefType" nillable="false" abstract="false"/>
    <element name="priorityLocation" type="gml:PriorityLocationPropertyType" substitutionGroup="gml:location" nillable="false" abstract="false"/>
    <complexType name="PriorityLocationPropertyType" mixed="false" abstract="false">
        <annotation>
            <documentation>G-XML component</documentation>
        </annotation>
        <complexContent>
            <extension base="gml:LocationPropertyType">
                <attribute name="priority" type="string" use="optional"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="centerOf" type="gml:PointPropertyType" substitutionGroup="gml:pointProperty" nillable="false" abstract="false"/>
    <element name="position" type="gml:PointPropertyType" substitutionGroup="gml:pointProperty" nillable="false" abstract="false"/>
    <element name="edgeOf" type="gml:CurvePropertyType" substitutionGroup="gml:curveProperty" nillable="false" abstract="false"/>
    <element name="centerLineOf" type="gml:CurvePropertyType" substitutionGroup="gml:curveProperty" nillable="false" abstract="false"/>
    <element name="extentOf" type="gml:SurfacePropertyType" substitutionGroup="gml:surfaceProperty" nillable="false" abstract="false"/>
    <element name="coverage" type="gml:SurfacePropertyType" substitutionGroup="gml:surfaceProperty" nillable="false" abstract="false">
        <annotation>
            <appinfo>deprecated</appinfo>
            <documentation>deprecated in gml 3.0</documentation>
        </annotation>
    </element>
</schema>