Repack testfile.tar.gz without volume label for portability
[gpstools.git] / Tools / xsd / gpx / gpx-1.0.xsd
bloba49992ddd6358974d8c10f51373fad6b7a1b829e
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- GPX.xsd version 1.0 - For more information on GPX and this schema, visit http://www.topografix.com/gpx.asp -->
3 <xsd:schema
4 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5 xmlns:gpx="http://www.topografix.com/GPX/1/0"
6 targetNamespace="http://www.topografix.com/GPX/1/0"
7 elementFormDefault="qualified">
9 <!-- Main GPX definition -->
11 <xsd:element name="gpx">
12 <xsd:complexType>
13 <xsd:sequence>
14 <xsd:element name="name" type="xsd:string" minOccurs="0"/> <!-- GPX file name -->
15 <xsd:element name="desc" type="xsd:string" minOccurs="0"/> <!-- GPX file description -->
16 <xsd:element name="author" type="xsd:string" minOccurs="0"/> <!-- GPX file author -->
17 <xsd:element name="email" type="gpx:emailType" minOccurs="0"/> <!-- GPX file author email -->
18 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/> <!-- GPX file URL -->
19 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
20 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/> <!-- GPX file creation time -->
21 <xsd:element name="keywords" type="xsd:string" minOccurs="0"/> <!-- GPX file keywords -->
22 <xsd:element name="bounds" type="gpx:boundsType" minOccurs="0"/> <!-- GPX file bounding rect -->
23 <xsd:element name="wpt" minOccurs="0" maxOccurs="unbounded">
24 <xsd:complexType>
25 <xsd:sequence> <!-- elements must appear in this order -->
26 <!-- Position info -->
27 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
28 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
29 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
30 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
32 <!-- Description info -->
33 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
34 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
35 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
36 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
37 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
38 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
39 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
40 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
42 <!-- Accuracy info -->
43 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
44 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
45 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
46 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
47 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
48 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
49 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
51 <!-- you can add your own privately defined wpt elements at the end of the wpt -->
52 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
53 </xsd:sequence>
54 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
55 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
56 </xsd:complexType>
57 </xsd:element>
58 <xsd:element name="rte" minOccurs="0" maxOccurs="unbounded">
59 <xsd:complexType>
60 <xsd:sequence>
61 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
62 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
63 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
64 <xsd:element name="src" type="xsd:string" minOccurs="0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
65 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
66 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
67 <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/> <!-- GPS track number -->
68 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
69 <!-- you can add your own privately defined rte elements at the end of the rte -->
70 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
71 <xsd:element name="rtept" minOccurs="0" maxOccurs="unbounded">
72 <xsd:complexType>
73 <xsd:sequence> <!-- elements must appear in this order -->
75 <!-- Position info -->
76 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
77 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
78 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
79 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
81 <!-- Description info -->
82 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
83 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
84 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
85 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
86 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
87 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
88 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
89 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
91 <!-- Accuracy info -->
92 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
93 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
94 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
95 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
96 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
97 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
98 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
100 <!-- you can add your own privately defined rtept elements at the end of the rtept -->
101 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
102 </xsd:sequence>
103 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
104 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
105 </xsd:complexType>
106 </xsd:element>
107 </xsd:sequence>
108 </xsd:complexType>
109 </xsd:element>
110 <xsd:element name="trk" minOccurs="0" maxOccurs="unbounded">
111 <xsd:complexType>
112 <xsd:sequence>
113 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
114 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
115 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
116 <xsd:element name="src" type="xsd:string" minOccurs="0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
117 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
118 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
119 <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/> <!-- GPS track number -->
120 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
121 <!-- you can add your own privately defined trk elements at the end of the trk -->
122 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
123 <xsd:element name="trkseg" minOccurs="0" maxOccurs="unbounded">
124 <xsd:complexType>
125 <xsd:sequence> <!-- elements must appear in this order -->
126 <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded">
127 <xsd:complexType>
128 <xsd:sequence> <!-- elements must appear in this order -->
130 <!-- Position info -->
131 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
132 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
133 <xsd:element name="course" type="gpx:degreesType" minOccurs="0"/>
134 <xsd:element name="speed" type="xsd:decimal" minOccurs="0"/>
135 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
136 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
138 <!-- Description info -->
139 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
140 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
141 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
142 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
143 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
144 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
145 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
146 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
148 <!-- Accuracy info -->
149 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
150 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
151 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
152 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
153 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
154 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
155 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
157 <!-- you can add your own privately defined trkpt elements at the end of the trkpt -->
158 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
159 </xsd:sequence>
160 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
161 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
162 </xsd:complexType>
163 </xsd:element>
164 </xsd:sequence>
165 </xsd:complexType>
166 </xsd:element>
167 </xsd:sequence>
168 </xsd:complexType>
169 </xsd:element>
170 <!-- you can add your own privately defined elements at the end of the GPX file -->
171 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
172 </xsd:sequence>
173 <xsd:attribute name="version" type="xsd:string" use="required" fixed="1.0"/> <!-- version 1.0 -->
174 <xsd:attribute name="creator" type="xsd:string" use="required"/>
175 </xsd:complexType>
176 </xsd:element>
178 <!-- Other types used by GPX -->
180 <xsd:simpleType name="latitudeType">
181 <xsd:restriction base="xsd:decimal">
182 <xsd:minInclusive value="-90.0"/>
183 <xsd:maxInclusive value="90.0"/>
184 </xsd:restriction>
185 </xsd:simpleType>
187 <xsd:simpleType name="longitudeType">
188 <xsd:restriction base="xsd:decimal">
189 <xsd:minInclusive value="-180.0"/>
190 <xsd:maxInclusive value="180.0"/>
191 </xsd:restriction>
192 </xsd:simpleType>
194 <xsd:simpleType name="degreesType"> <!-- for bearing, heading, course. Units are degrees, true -->
195 <xsd:restriction base="xsd:decimal">
196 <xsd:minInclusive value="0.0"/>
197 <xsd:maxInclusive value="360.0"/>
198 </xsd:restriction>
199 </xsd:simpleType>
201 <xsd:simpleType name="fixType">
202 <xsd:restriction base="xsd:string">
203 <xsd:enumeration value="none"/> <!-- none means GPS had no fix. To signify "the fix info is unknown, leave out the <fix> tag entirely -->
204 <xsd:enumeration value="2d"/>
205 <xsd:enumeration value="3d"/>
206 <xsd:enumeration value="dgps"/>
207 <xsd:enumeration value="pps"/> <!-- military signal used -->
208 </xsd:restriction>
209 </xsd:simpleType>
211 <xsd:simpleType name="dgpsStationType">
212 <xsd:restriction base="xsd:integer">
213 <xsd:minInclusive value="0"/>
214 <xsd:maxInclusive value="1023"/>
215 </xsd:restriction>
216 </xsd:simpleType>
218 <xsd:complexType name="boundsType"> <!-- bounding rect for data in file -->
219 <xsd:attribute name="minlat" type="gpx:latitudeType" use="required"/>
220 <xsd:attribute name="minlon" type="gpx:longitudeType" use="required"/>
221 <xsd:attribute name="maxlat" type="gpx:latitudeType" use="required"/>
222 <xsd:attribute name="maxlon" type="gpx:longitudeType" use="required"/>
223 </xsd:complexType>
225 <xsd:simpleType name="emailType">
226 <xsd:restriction base="xsd:string">
227 <xsd:pattern value="[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+"/>
228 </xsd:restriction>
229 </xsd:simpleType>
231 </xsd:schema>