<?xml version="1.0"?>
 
<xsd:schema targetNamespace="http://www.garmin.com/xmlschemas/VideoExtension/v1"
        elementFormDefault="qualified" 
        xmlns="http://www.garmin.com/xmlschemas/VideoExtension/v1"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
  <xsd:annotation>
    <xsd:documentation>
      This schema defines the Garmin video extension 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" element in the trk 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="VideoExtension" type="VideoExtension_t"/>
 
  <xsd:complexType name="VideoExtension_t">
    <xsd:annotation>
      <xsd:documentation>
        This type holds a TimeIndexTable_t and any extensions to this schema.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="TimeIndexTable" type="TimeIndexTable_t" minOccurs="1" maxOccurs="unbounded"/>
      <xsd:element name="Extensions" type="Extensions_t" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>
  
  <xsd:complexType name="TimeIndexTable_t">
    <xsd:annotation>
      <xsd:documentation>
        This type contains a list of indices that sync the time into movie playback with the time into a given track segment.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="TimeIndex" type="TimeIndex_t" minOccurs="1" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="MoviePath" type="xsd:string" use="required">
      <xsd:annotation>
        <xsd:documentation>
          This attribute is the path to the movie indexed by this table.
          This may be a local file path (relative to the location of the .gpx file), or a
          web URL for videos hosted online.
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <xsd:complexType name="TimeIndex_t">
    <xsd:attribute name="MovieTime" type="xsd:unsignedInt" use="required">
      <xsd:annotation>
        <xsd:documentation>
          This attribute is the offset in milliseconds into the movie referenced by the containing TimeIndexTable_t.
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="TrackTime" type="xsd:unsignedInt" use="optional">
      <xsd:annotation>
        <xsd:documentation>
          This attribute is the offset in milliseconds into the track segment.  This value can be omitted if there is no track point for this index.
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="TrackSegmentIndex" type="xsd:unsignedInt" use="required">
      <xsd:annotation>
        <xsd:documentation>
          This attribute is the track segment index.
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType> 
 
  <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>