GPX Style Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace http://www.topografix.com/GPX/gpx_style/0/2
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.

Declared Namespaces

Prefix Namespace
Default namespace http://www.topografix.com/GPX/gpx_style/0/2
xml http://www.w3.org/XML/1998/namespace
xsd http://www.w3.org/2001/XMLSchema
Schema Component Representation
<xsd:schema targetNamespace="http://www.topografix.com/GPX/gpx_style/0/2" elementFormDefault="qualified">
...
</xsd:schema>
top

Global Declarations

Element: align

Name align
Type alignType
Nillable no
Abstract no
Documentation Generic horizontal alignment (for text, e.g.)
XML Instance Representation
<align> alignType </align>
Schema Component Representation
<xsd:element name="align" type="alignType"/>
top

Element: fill

Name fill
Type fillType
Nillable no
Abstract no
Documentation Background fill pattern for a filled object (closed track, polygon, text box, etc)
XML Instance Representation
<fill>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<pattern> xsd:string </pattern> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</fill>
Schema Component Representation
<xsd:element name="fill" type="fillType"/>
top

Element: line

Name line
Type lineType
Nillable no
Abstract no
Documentation Graphical style for a linear feature (route, track, border of filled object, etc).
XML Instance Representation
<line>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<width> xsd:decimal </width> [0..1] ?
<pattern> xsd:string </pattern> [0..1] ?
<linecap> linecapType </linecap> [0..1] ?
<dasharray> dasharrayType </dasharray> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</line>
Schema Component Representation
<xsd:element name="line" type="lineType"/>
top

Element: text

Name text
Type textType
Nillable no
Abstract no
Documentation Text size, color, style
XML Instance Representation
<text>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<font> fontType </font> [0..1] ?
<align> alignType </align> [0..1] ?
<vertical-align> vertical-alignType </vertical-align> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</text>
Schema Component Representation
<xsd:element name="text" type="textType"/>
top

Element: vertical-align

Name vertical-align
Type vertical-alignType
Nillable no
Abstract no
Documentation Generic vertical alignment (for text, e.g.)
XML Instance Representation
<vertical-align> vertical-alignType </vertical-align>
Schema Component Representation
<xsd:element name="vertical-align" type="vertical-alignType"/>
top

Global Definitions

Complex Type: dashType

Super-types: None
Sub-types: None
Name dashType
Abstract no
Documentation mark and space of a dash pattern. Units are millimeters
XML Instance Representation
<...
mark="xsd:decimal [1] ?"
space="xsd:decimal [1] ?"/>
Schema Component Representation
<xsd:complexType name="dashType">
<xsd:attribute name="mark" type="xsd:decimal" use="required"/>
<xsd:attribute name="space" type="xsd:decimal" use="required"/>
</xsd:complexType>
top

Complex Type: dasharrayType

Super-types: None
Sub-types: None
Name dasharrayType
Abstract no
Documentation Dasharray contains one or more dash elements
XML Instance Representation
<...>
<dash> dashType </dash> [1..*] ?
</...>
Schema Component Representation
<xsd:complexType name="dasharrayType">
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="dash" type="dashType" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
top

Complex Type: extensionsType

Super-types: None
Sub-types: None
Name extensionsType
Abstract no
Documentation You can add extend GPX by adding your own elements from another schema here.
XML Instance Representation
<...>
Allow any elements from a namespace other than this schema's namespace (strict validation). [0..*]
</...>
Schema Component Representation
<xsd:complexType name="extensionsType">
<xsd:sequence>
<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
top

Complex Type: fillType

Super-types: None
Sub-types: None
Name fillType
Abstract no
Documentation Background fill style for filled object (closed track, polygon, text box, etc)
XML Instance Representation
<...>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<pattern> xsd:string </pattern> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</...>
Schema Component Representation
<xsd:complexType name="fillType">
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="color" type="colorType" minOccurs="0"/>
<xsd:element name="opacity" type="opacityType" minOccurs="0"/>
<xsd:element name="pattern" type="xsd:string" minOccurs="0"/>
<xsd:element name="extensions" type="extensionsType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
top

Complex Type: fontFamilyType

Super-types: None
Sub-types: None
Name fontFamilyType
Abstract no
Documentation if you specify a font, you must specify a generic "fallback"
XML Instance Representation
<...
generic="genericFontFamilyType [1] ?">
<face> xsd:string </face> [0..1] ?
</...>
Schema Component Representation
<xsd:complexType name="fontFamilyType">
<-- if you specify a font, you must specify a generic "fallback" -->
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="face" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="generic" type="genericFontFamilyType" use="required"/>
</xsd:complexType>
top

Complex Type: fontType

Super-types: None
Sub-types: None
Name fontType
Abstract no
Documentation Font size and style
XML Instance Representation
<...>
<family> fontFamilyType </family> [0..1] ?
<size> xsd:decimal </size> [0..1] ?
<weight> weightType </weight> [0..1] ?
<style> styleType </style> [0..1] ?
<text-transform> textTransformType </text-transform> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</...>
Schema Component Representation
<xsd:complexType name="fontType">
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="family" type="fontFamilyType" minOccurs="0"/>
<xsd:element name="size" type="xsd:decimal" minOccurs="0"/>
<xsd:element name="weight" type="weightType" minOccurs="0"/>
<xsd:element name="style" type="styleType" minOccurs="0"/>
<xsd:element name="text-transform" type="textTransformType" minOccurs="0"/>
<xsd:element name="extensions" type="extensionsType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
top

Complex Type: lineType

Super-types: None
Sub-types: None
Name lineType
Abstract no
Documentation Graphical style for a linear feature (route, track, border of filled object, etc).
XML Instance Representation
<...>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<width> xsd:decimal </width> [0..1] ?
<pattern> xsd:string </pattern> [0..1] ?
<linecap> linecapType </linecap> [0..1] ?
<dasharray> dasharrayType </dasharray> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</...>
Schema Component Representation
<xsd:complexType name="lineType">
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="color" type="colorType" minOccurs="0"/>
<xsd:element name="opacity" type="opacityType" minOccurs="0"/>
<xsd:element name="width" type="xsd:decimal" minOccurs="0"/>
<xsd:element name="pattern" type="xsd:string" minOccurs="0"/>
<xsd:element name="linecap" type="linecapType" minOccurs="0"/>
<xsd:element name="dasharray" type="dasharrayType" minOccurs="0"/>
<xsd:element name="extensions" type="extensionsType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
top

Complex Type: textType

Super-types: None
Sub-types: None
Name textType
Abstract no
Documentation Text font, size, color, etc.
XML Instance Representation
<...>
<color> colorType </color> [0..1] ?
<opacity> opacityType </opacity> [0..1] ?
<font> fontType </font> [0..1] ?
<align> alignType </align> [0..1] ?
<vertical-align> vertical-alignType </vertical-align> [0..1] ?
<extensions> extensionsType </extensions> [0..1] ?
</...>
Schema Component Representation
<xsd:complexType name="textType">
<xsd:sequence>
<-- elements must appear in this order -->
<xsd:element name="color" type="colorType" minOccurs="0"/>
<xsd:element name="opacity" type="opacityType" minOccurs="0"/>
<xsd:element name="font" type="fontType" minOccurs="0"/>
<xsd:element name="align" type="alignType" minOccurs="0"/>
<xsd:element name="vertical-align" type="vertical-alignType" minOccurs="0"/>
<xsd:element name="extensions" type="extensionsType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
top

Simple Type: alignType

Super-types: xsd:string < alignType (by restriction)
Sub-types: None
Name alignType
Content
  • Base XSD Type: string
  • value comes from list: {'left'|'center'|'right'}
Schema Component Representation
<xsd:simpleType name="alignType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="left"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="right"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: colorType

Super-types: xsd:hexBinary < colorType (by restriction)
Sub-types: None
Name colorType
Content
  • Base XSD Type: hexBinary
  • length = 3
Documentation Hex RGB color (FF0000 = red)
Schema Component Representation
<xsd:simpleType name="colorType">
<xsd:restriction base="xsd:hexBinary">
<xsd:length value="3"/>
<-- 3 octets, RGB (ff0000) -->
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: genericFontFamilyType

Super-types: xsd:string < genericFontFamilyType (by restriction)
Sub-types: None
Name genericFontFamilyType
Content
  • Base XSD Type: string
  • value comes from list: {'serif'|'sans-serif'|'cursive'|'fantasy'|'monospace'}
Documentation see http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families
Schema Component Representation
<xsd:simpleType name="genericFontFamilyType">
<-- see http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families -->
<xsd:restriction base="xsd:string">
<xsd:enumeration value="serif"/>
<xsd:enumeration value="sans-serif"/>
<xsd:enumeration value="cursive"/>
<xsd:enumeration value="fantasy"/>
<-- ie, symbol fonts -->
<xsd:enumeration value="monospace"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: linecapType

Super-types: xsd:string < linecapType (by restriction)
Sub-types: None
Name linecapType
Content
  • Base XSD Type: string
  • value comes from list: {'butt'|'round'|'square'}
Schema Component Representation
<xsd:simpleType name="linecapType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="butt"/>
<xsd:enumeration value="round"/>
<xsd:enumeration value="square"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: opacityType

Super-types: xsd:decimal < opacityType (by restriction)
Sub-types: None
Name opacityType
Content
  • Base XSD Type: decimal
  • 0.0 <= value <= 1.0
Documentation 0.0 = completely transparent; 1.0 = completely opaque
Schema Component Representation
<xsd:simpleType name="opacityType">
<xsd:restriction base="xsd:decimal">
<xsd:minInclusive value="0.0"/>
<-- completely transparent -->
<xsd:maxInclusive value="1.0"/>
<-- completely opaque -->
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: styleType

Super-types: xsd:string < styleType (by restriction)
Sub-types: None
Name styleType
Content
  • Base XSD Type: string
  • value comes from list: {'normal'|'italic'}
Schema Component Representation
<xsd:simpleType name="styleType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="normal"/>
<xsd:enumeration value="italic"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: textTransformType

Super-types: xsd:string < textTransformType (by restriction)
Sub-types: None
Name textTransformType
Content
  • Base XSD Type: string
  • value comes from list: {'capitalize'|'uppercase'|'lowercase'|'none'}
Documentation http://www.w3.org/TR/REC-CSS2/text.html#caps-prop
Schema Component Representation
<xsd:simpleType name="textTransformType">
<-- see http://www.w3.org/TR/REC-CSS2/text.html#caps-prop -->
<xsd:restriction base="xsd:string">
<xsd:enumeration value="capitalize"/>
<xsd:enumeration value="uppercase"/>
<xsd:enumeration value="lowercase"/>
<xsd:enumeration value="none"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: vertical-alignType

Super-types: xsd:string < vertical-alignType (by restriction)
Sub-types: None
Name vertical-alignType
Content
  • Base XSD Type: string
  • value comes from list: {'top'|'center'|'bottom'}
Schema Component Representation
<xsd:simpleType name="vertical-alignType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="top"/>
<xsd:enumeration value="center"/>
<xsd:enumeration value="bottom"/>
</xsd:restriction>
</xsd:simpleType>
top

Simple Type: weightType

Super-types: xsd:string < weightType (by restriction)
Sub-types: None
Name weightType
Content
  • Base XSD Type: string
  • value comes from list: {'normal'|'bold'}
Schema Component Representation
<xsd:simpleType name="weightType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="normal"/>
<xsd:enumeration value="bold"/>
</xsd:restriction>
</xsd:simpleType>
top