<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" 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:topology:v3.2.0">topology.xsd</appinfo>
        <documentation>see GML Clause 13</documentation>
    </annotation>
    <include schemaLocation="geometryComplexes.xsd"/>
    <complexType name="AbstractTopologyType" abstract="true" mixed="false">
        <complexContent>
            <extension base="gml:AbstractGMLType"/>
        </complexContent>
    </complexType>
    <element name="AbstractTopology" type="gml:AbstractTopologyType" abstract="true" substitutionGroup="gml:AbstractGML" nillable="false"/>
    <complexType name="AbstractTopoPrimitiveType" abstract="true" mixed="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:isolated" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:container" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <element name="AbstractTopoPrimitive" type="gml:AbstractTopoPrimitiveType" abstract="true" substitutionGroup="gml:AbstractTopology" nillable="false"/>
    <element name="isolated" type="gml:IsolatedPropertyType" nillable="false" abstract="false"/>
    <complexType name="IsolatedPropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <choice minOccurs="1" maxOccurs="1">
                <element ref="gml:Node" minOccurs="1" maxOccurs="1" nillable="false"/>
                <element ref="gml:Edge" minOccurs="1" maxOccurs="1" nillable="false"/>
            </choice>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="container" type="gml:ContainerPropertyType" nillable="false" abstract="false"/>
    <complexType name="ContainerPropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <choice minOccurs="1" maxOccurs="1">
                <element ref="gml:Face" minOccurs="1" maxOccurs="1" nillable="false"/>
                <element ref="gml:TopoSolid" minOccurs="1" maxOccurs="1" nillable="false"/>
            </choice>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="NodeType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopoPrimitiveType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedEdge" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:pointProperty" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="Node" type="gml:NodeType" substitutionGroup="gml:AbstractTopoPrimitive" nillable="false" abstract="false"/>
    <element name="directedNode" type="gml:DirectedNodePropertyType" nillable="false" abstract="false"/>
    <complexType name="DirectedNodePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:Node" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attribute name="orientation" type="gml:SignType" default="+" use="optional"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="EdgeType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopoPrimitiveType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedNode" minOccurs="2" maxOccurs="2" nillable="false"/>
                    <element ref="gml:directedFace" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:curveProperty" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="Edge" type="gml:EdgeType" substitutionGroup="gml:AbstractTopoPrimitive" nillable="false" abstract="false"/>
    <element name="directedEdge" type="gml:DirectedEdgePropertyType" nillable="false" abstract="false"/>
    <complexType name="DirectedEdgePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:Edge" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attribute name="orientation" type="gml:SignType" default="+" use="optional"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="FaceType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopoPrimitiveType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedEdge" maxOccurs="unbounded" minOccurs="1" nillable="false"/>
                    <element ref="gml:directedTopoSolid" minOccurs="0" maxOccurs="2" nillable="false"/>
                    <element ref="gml:surfaceProperty" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="Face" type="gml:FaceType" substitutionGroup="gml:AbstractTopoPrimitive" nillable="false" abstract="false"/>
    <element name="directedFace" type="gml:DirectedFacePropertyType" nillable="false" abstract="false"/>
    <complexType name="DirectedFacePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:Face" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attribute name="orientation" type="gml:SignType" default="+" use="optional"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="TopoSolidType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopoPrimitiveType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedFace" maxOccurs="unbounded" minOccurs="1" nillable="false"/>
                    <element ref="gml:solidProperty" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoSolid" type="gml:TopoSolidType" substitutionGroup="gml:AbstractTopoPrimitive" nillable="false" abstract="false"/>
    <element name="directedTopoSolid" type="gml:DirectedTopoSolidPropertyType" nillable="false" abstract="false"/>
    <complexType name="DirectedTopoSolidPropertyType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:TopoSolid" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attribute name="orientation" type="gml:SignType" default="+" use="optional"/>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="TopoPointType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedNode" minOccurs="1" maxOccurs="1" nillable="false"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoPoint" type="gml:TopoPointType" nillable="false" abstract="false"/>
    <complexType name="TopoPointPropertyType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:TopoPoint" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="topoPointProperty" type="gml:TopoPointPropertyType" nillable="false" abstract="false"/>
    <complexType name="TopoCurveType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedEdge" maxOccurs="unbounded" minOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoCurve" type="gml:TopoCurveType" nillable="false" abstract="false"/>
    <complexType name="TopoCurvePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:TopoCurve" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="topoCurveProperty" type="gml:TopoCurvePropertyType" nillable="false" abstract="false"/>
    <complexType name="TopoSurfaceType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedFace" maxOccurs="unbounded" minOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoSurface" type="gml:TopoSurfaceType" nillable="false" abstract="false"/>
    <complexType name="TopoSurfacePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:TopoSurface" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="topoSurfaceProperty" type="gml:TopoSurfacePropertyType" nillable="false" abstract="false"/>
    <complexType name="TopoVolumeType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:directedTopoSolid" maxOccurs="unbounded" minOccurs="1" nillable="false"/>
                </sequence>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoVolume" type="gml:TopoVolumeType" nillable="false" abstract="false"/>
    <complexType name="TopoVolumePropertyType" mixed="false" abstract="false">
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:TopoVolume" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="topoVolumeProperty" type="gml:TopoVolumePropertyType" nillable="false" abstract="false"/>
    <complexType name="TopoComplexType" mixed="false" abstract="false">
        <complexContent>
            <extension base="gml:AbstractTopologyType">
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:maximalComplex" minOccurs="1" maxOccurs="1" nillable="false"/>
                    <element ref="gml:superComplex" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:subComplex" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:topoPrimitiveMember" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
                    <element ref="gml:topoPrimitiveMembers" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
                <attribute name="isMaximal" type="boolean" default="false" use="optional"/>
                <attributeGroup ref="gml:AggregationAttributeGroup"/>
            </extension>
        </complexContent>
    </complexType>
    <element name="TopoComplex" type="gml:TopoComplexType" substitutionGroup="gml:AbstractTopology" nillable="false" abstract="false"/>
    <element name="subComplex" type="gml:TopoComplexMemberType" nillable="false" abstract="false"/>
    <element name="superComplex" type="gml:TopoComplexMemberType" nillable="false" abstract="false"/>
    <element name="maximalComplex" type="gml:TopoComplexMemberType" nillable="false" abstract="false"/>
    <element name="topoPrimitiveMember" type="gml:TopoPrimitiveMemberType" nillable="false" abstract="false"/>
    <complexType name="TopoPrimitiveMemberType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:AbstractTopoPrimitive" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="topoPrimitiveMembers" type="gml:TopoPrimitiveArrayAssociationType" nillable="false" abstract="false"/>
    <complexType name="TopoPrimitiveArrayAssociationType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="unbounded">
            <element ref="gml:AbstractTopoPrimitive" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <complexType name="TopoComplexMemberType" mixed="false" abstract="false">
        <sequence minOccurs="0" maxOccurs="1">
            <element ref="gml:TopoComplex" minOccurs="1" maxOccurs="1" nillable="false"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
    </complexType>
    <element name="topoComplexProperty" type="gml:TopoComplexMemberType" nillable="false" abstract="false"/>
</schema>