<?xml version="1.0"?>
<xsd:schema targetNamespace="http://www.garmin.com/xmlschemas/WaypointExtension/v1"
  elementFormDefault="qualified"
  xmlns="http://www.garmin.com/xmlschemas/WaypointExtension/v1"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:annotation><xsd:documentation>
  This schema defines Garmin extensions to be used with the GPX 1.1 schema.
  The root element defined by this schema is intended to be used as a child
  element of the "extensions" elements in the wpt element in the GPX 1.1 schema. 
  The GPX 1.1 schema is available at http://www.topografix.com/GPX/1/1/gpx.xsd.
  </xsd:documentation></xsd:annotation>

  <xsd:element name="WaypointExtension" type="WaypointExtension_t" />

  <xsd:complexType name="WaypointExtension_t">
    <xsd:annotation><xsd:documentation>
    This type contains data fields available in Garmin GDB waypoints that cannot
    be represented in waypoints in GPX 1.1 instances.
    </xsd:documentation></xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Proximity" type="Meters_t" minOccurs="0" />
      <xsd:element name="Temperature" type="DegreesCelsius_t" minOccurs="0" />
      <xsd:element name="Depth" type="Meters_t" minOccurs="0" />
      <xsd:element name="DisplayMode" type="DisplayMode_t" minOccurs="0" />
      <xsd:element name="Categories" type="Categories_t" minOccurs="0" />
      <xsd:element name="Address" type="Address_t" minOccurs="0"/>
      <xsd:element name="PhoneNumber" type="PhoneNumber_t" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="Samples" type="xsd:int" minOccurs="0" />
      <xsd:element name="Expiration" type="xsd:dateTime" minOccurs="0">
        <xsd:annotation><xsd:documentation>
        Same as creation timestamp. Date and time are in Univeral Coordinated Time (UTC), not local time. Conforms to ISO 8601 specification for date/time representation. Fractional seconds are allowed for millisecond timing in tracklogs. 
      </xsd:documentation></xsd:annotation>
      </xsd:element>
      <xsd:element name="Extensions" type="Extensions_t" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="Categories_t">
    <xsd:annotation><xsd:documentation>
    This type contains a list of categories to which a waypoint has been assigned.
    Note that this list may contain categories which do not exist for a particular
    application installation.
    </xsd:documentation></xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Category" type="xsd:string" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="Address_t">
    <xsd:sequence>
      <xsd:element name="StreetAddress" type="xsd:token" minOccurs="0" maxOccurs="2"/>
      <xsd:element name="City" type="xsd:token" minOccurs="0"/>
      <xsd:element name="State" type="xsd:token" minOccurs="0"/>
      <xsd:element name="Country" type="xsd:token" minOccurs="0"/>
      <xsd:element name="PostalCode" type="xsd:token" minOccurs="0"/>
      <xsd:element name="Extensions" type="Extensions_t" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="PhoneNumber_t">
    <xsd:simpleContent>
      <xsd:extension base="xsd:token">
        <xsd:attribute name="Category" type="xsd:token">
        <xsd:annotation>
        <xsd:documentation>Category provides the ability to specify the type of a 
        phone number. For example, a phone number can be categorized as
        "Home", "Work", "Mobile" e.t.c</xsd:documentation>
        </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>

  <xsd:simpleType name="DegreesCelsius_t">
    <xsd:annotation><xsd:documentation>
    This type contains a temperature value measured in degrees Celsius.
    </xsd:documentation></xsd:annotation>
    <xsd:restriction base="xsd:double"/>
  </xsd:simpleType>

  <xsd:simpleType name="Meters_t">
    <xsd:annotation><xsd:documentation>
    This type contains a distance value measured in meters.
    </xsd:documentation></xsd:annotation>
    <xsd:restriction base="xsd:double"/>
  </xsd:simpleType>

  <xsd:simpleType name="DisplayMode_t">
    <xsd:annotation><xsd:documentation>
    This type contains a string that specifies how a waypoint should be
    displayed on a map.
    </xsd:documentation></xsd:annotation>
    <xsd:restriction base="xsd:token">
      <xsd:enumeration value="SymbolOnly"/>
      <xsd:enumeration value="SymbolAndName"/>
      <xsd:enumeration value="SymbolAndDescription"/>
    </xsd:restriction>
  </xsd:simpleType>

    <xsd:complexType name="Extensions_t">
    <xsd:annotation>
    <xsd:documentation>This type provides the ability to extend any data type that includes it.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>

</xsd:schema>
