<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="MapPos" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:addr="addr"
    xmlns:addr_type="addr_type" xmlns:MapPos="MapPos" xmlns:gml="gml/3.2.1/gml.xsd">
    <!-- MapPositionSchema xmlns:gmlPoint="gml/3.2.1/gml.xsd"-->

    <!-- file:/U:/Address_Standard/RevisionInfo/MapPositionSchema.xsd -->
    <xsd:import namespace="addr_type" schemaLocation="addr_type.xsd">
        <xsd:annotation>
            <xsd:documentation> Base types form the AddressStandard Federal Geographic Data
                Committee FGDC Document Number FGDC-STD-016-2011 United States Thoroughfare,
                Landmark, and Postal Address Data Standard 468 </xsd:documentation>
        </xsd:annotation>
    </xsd:import>



    <!--  <xsd:import namespace="gml/3.2.1/gml.xsd" schemaLocation="/3.2.1/gml.xsd"/> -->

    <xsd:import namespace="gml/3.2.1/gml.xsd"
        schemaLocation="file:/U:/Address_Standard/Address%20Position%20Proposal/RevisionInfo/3.2.1/gml.xsd"/>


    <xsd:element name="AddressCollection">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="MapPosition" type="MapPos:MapPosition_type"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>


    <!-- Example of Schema with AddressPosition as a child element of MapPosition -->
    <!-- -->
    <xsd:complexType name="MapPosition_type">
        <xsd:sequence>
            <xsd:element name="AddressPosition" type="MapPos:AddressPosition_type" minOccurs="1"/>
            <xsd:group ref="MapPos:MapPositionGroup"/>
        </xsd:sequence>
    </xsd:complexType> 

    <!-- Example of Schema with AddressPosition as an attribute of MapPosition -->
    <!-- 
    <xsd:complexType name="MapPosition_type">
        <xsd:sequence>
            <xsd:group ref="MapPos:MapPositionGroup"/>
        </xsd:sequence>
        <xsd:attribute name="AddressPosition" type="MapPos:AddressPosition_type"/>
    </xsd:complexType>-->

    <xsd:group name="MapPositionGroup">
        <xsd:annotation>
            <xsd:documentation>A description of what a given set of address coordinates represent
                along with the coordinates themselves. This could be the position of coordinate or
                the point of collection of the coordinate. In GML, a Point is defined by a single
                coordinate tuple. A tuple is a way of storing multiple values in a single value The
                direct position of a point is specified by the pos element which is of type
                DirectPositionType. </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element ref="gml:Point"/>
        </xsd:sequence>
    </xsd:group>

   <!--  <xsd:group name="PointElvationGroup">
        <xsd:annotation>
            <xsd:documentation>A description of the elevation of the coordinates. It consists of the
                elevation element and a unitOfMeasure element</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="elevation"/>
            <xsd:element ref="gml:unitOfMeasure"/>
        </xsd:sequence>
    </xsd:group> -->

    <xsd:simpleType name="AddressPosition_type">
        <xsd:annotation>
            <xsd:documentation>A description of the position the coordinates represent.  Such descriptions could be "Front Door", "Parcel Centroid", 
                "Building Centroid", "Driveway" amongst others.</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:pattern value=".*"/>
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>
