<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://www.opengis.net/gml" elementFormDefault="qualified" version="3.2.0" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
    <annotation>
        <appinfo source="urn:opengis:specification:gml:schema-xsd:gmlBase:v3.2.0">gmlBase.xsd</appinfo>
        <documentation>see GML 7.5</documentation>
    </annotation>
    <include schemaLocation="basicTypes.xsd"/>
    <import namespace="http://www.w3.org/1999/xlink" schemaLocation="../xlink/xlinks.xsd"/>
    <element name="AbstractObject" abstract="true" nillable="false"/>
    <element name="AbstractGML" type="gml:AbstractGMLType" abstract="true" substitutionGroup="gml:AbstractObject" nillable="false"/>
    <complexType name="AbstractGMLType" abstract="true" mixed="false">
        <sequence minOccurs="1" maxOccurs="1">
            <group ref="gml:StandardObjectProperties" minOccurs="1" maxOccurs="1"/>
        </sequence>
        <attribute ref="gml:id" use="required"/>
    </complexType>
    <group name="StandardObjectProperties">
        <sequence>
            <element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
            <element ref="gml:description" minOccurs="0" maxOccurs="1" nillable="false"/>
            <element ref="gml:descriptionReference" minOccurs="0" maxOccurs="1" nillable="false"/>
            <element ref="gml:identifier" minOccurs="0" maxOccurs="1" nillable="false"/>
            <element ref="gml:name" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
        </sequence>
    </group>
    <attributeGroup name="AssociationAttributeGroup">
        <attributeGroup ref="xlink:simpleLink"/>
        <attribute name="nilReason" type="gml:NilReasonType" use="optional"/>
        <attribute ref="gml:remoteSchema" use="optional"/>
    </attributeGroup>
    <attribute name="remoteSchema" type="anyURI"/>
    <element name="abstractAssociationRole" type="gml:AssociationRoleType" abstract="true" nillable="false"/>
    <complexType name="AssociationRoleType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:AbstractObject" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
    </complexType>
    <attributeGroup name="OwnershipAttributeGroup">
        <attribute name="owns" type="boolean" default="false" use="optional"/>
    </attributeGroup>
    <element name="abstractStrictAssociationRole" type="gml:AssociationRoleType" abstract="true" nillable="false">
        <annotation>
            <appinfo>
                <sch:ns prefix="gml" uri="http://www.opengis.net/gml"/>
                <sch:ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>
                <sch:pattern name="Check either href or content not both">
                    <sch:rule id="hrefOrContent" context="gml:abstractStrictAssociationRole">
                        <sch:report test="@xlink:href and (*|text())">Property element may not carry both a reference to an object and contain an object.</sch:report>
                        <sch:assert test="@xlink:href | (*|text())">Property element must either carry a reference to an object or contain an object.</sch:assert>
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <element name="abstractReference" type="gml:ReferenceType" abstract="true" nillable="false"/>
    <complexType name="ReferenceType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
    </complexType>
    <element name="abstractInlineProperty" type="gml:InlinePropertyType" abstract="true" nillable="false"/>
    <complexType name="InlinePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:AbstractObject" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="member" type="gml:AssociationRoleType" nillable="false" abstract="false"/>
    <complexType name="ArrayAssociationType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:AbstractObject" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="members" type="gml:ArrayAssociationType" nillable="false" abstract="false"/>
    <complexType name="StringOrRefType" mixed="false" abstract="false">
        <simpleContent>
            <extension base="string">
                <attributeGroup ref="gml:AssociationAttributeGroup"/>
            </extension>
        </simpleContent>
    </complexType>
    <element name="metaDataProperty" type="gml:MetaDataPropertyType" nillable="false" abstract="false"/>
    <element name="description" type="gml:StringOrRefType" nillable="false" abstract="false"/>
    <element name="descriptionReference" type="gml:ReferenceType" nillable="false" abstract="false"/>
    <element name="name" type="gml:CodeType" nillable="false" abstract="false"/>
    <element name="identifier" type="gml:CodeWithAuthorityType" nillable="false" abstract="false"/>
    <attribute name="id" type="ID"/>
    <complexType name="AbstractMemberType" abstract="true" mixed="false">
        <sequence minOccurs="1" maxOccurs="1"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <attributeGroup name="AggregationAttributeGroup">
        <attribute name="aggregationType" type="gml:AggregationType" use="optional"/>
    </attributeGroup>
    <simpleType name="AggregationType" final="#all">
        <restriction base="string">
            <enumeration value="set"/>
            <enumeration value="bag"/>
            <enumeration value="sequence"/>
            <enumeration value="array"/>
            <enumeration value="record"/>
            <enumeration value="table"/>
        </restriction>
    </simpleType>
    <element name="Bag" type="gml:BagType" substitutionGroup="gml:AbstractGML" nillable="false" abstract="false"/>
    <complexType name="BagType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:member" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:members" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <element name="Array" type="gml:ArrayType" substitutionGroup="gml:AbstractGML" nillable="false" abstract="false"/>
    <complexType name="ArrayType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:members" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="AbstractMetadataPropertyType" abstract="true" mixed="false">
        <sequence minOccurs="1" maxOccurs="1"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="MetaDataPropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:AbstractMetaData" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attribute name="about" type="anyURI" use="optional"/>
    </complexType>
    <element name="AbstractMetaData" type="gml:AbstractMetaDataType" abstract="true" substitutionGroup="gml:AbstractObject" nillable="false"/>
    <complexType name="AbstractMetaDataType" abstract="true" mixed="true">
        <sequence minOccurs="1" maxOccurs="1"/>
        <attribute ref="gml:id" use="optional"/>
    </complexType>
    <element name="GenericMetaData" type="gml:GenericMetaDataType" substitutionGroup="gml:AbstractMetaData" nillable="false" abstract="false"/>
    <complexType name="GenericMetaDataType" mixed="true" abstract="false">
        <complexContent mixed="true">
            <extension base="gml:AbstractMetaDataType">
                <sequence minOccurs="1" maxOccurs="1">
                    <any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <element name="reversePropertyName" type="string" nillable="false" abstract="false"/>
    <element name="targetElement" type="string" nillable="false" abstract="false"/>
    <element name="associationName" type="string" nillable="false" abstract="false"/>
    <element name="defaultCodeSpace" type="anyURI" nillable="false" abstract="false"/>
</schema>