aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/test/xmerl_xsd_SUITE_data/gpx/gpx.xsd
blob: 63d4640159b648675908912586481e9fa1b04b05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?xml version="1.0" encoding="UTF-8"?>
<!-- GPX.xsd version 1.0 - For more information on GPX and this schema, visit http://www.topografix.com/gpx.asp -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gpx="http://www.topografix.com/GPX/1/0" targetNamespace="http://www.topografix.com/GPX/1/0" elementFormDefault="qualified">

<!-- Main GPX definition -->

  <xsd:element name="gpx">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="name" type="xsd:string" minOccurs="0"/>		<!-- GPX file name -->
        <xsd:element name="desc" type="xsd:string" minOccurs="0"/>		<!-- GPX file description -->
        <xsd:element name="author" type="xsd:string" minOccurs="0"/>		<!-- GPX file author -->
        <xsd:element name="email" type="gpx:emailType" minOccurs="0"/>	<!-- GPX file author email -->
        <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>		<!-- GPX file URL -->
 		<xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
        <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>		<!-- GPX file creation time -->
        <xsd:element name="keywords" type="xsd:string" minOccurs="0"/>		<!-- GPX file keywords -->
        <xsd:element name="bounds" type="gpx:boundsType" minOccurs="0"/>	<!-- GPX file bounding rect -->
        <xsd:element name="wpt" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>	<!-- elements must appear in this order -->
			  <!-- Position info -->
              <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
              <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
			  <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
			  <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>

			  <!-- Description info -->
			  <xsd:element name="name" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="src" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
			  <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="type" type="xsd:string" minOccurs="0"/>

			  <!-- Accuracy info -->
			  <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
			  <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
			  <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
			  <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
			  <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
			  <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
			  <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>

			  <!-- you can add your own privately defined wpt elements at the end of the wpt -->
              <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
            <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="rte" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="name" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
              <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="src" type="xsd:string" minOccurs="0"/>	<!-- the source of this data: "Garmin eTrex", "Map", etc -->
			  <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
 			  <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/>	<!-- GPS track number -->
	<!--	  <xsd:element name="type"			type="xsd:string"	minOccurs="0"/>	PROPOSED -->
			  <!-- you can add your own privately defined rte elements at the end of the rte -->
              <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
              <xsd:element name="rtept" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>	<!-- elements must appear in this order -->

				    <!-- Position info -->
                    <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
                    <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
					<xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
					<xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>

					<!-- Description info -->
                    <xsd:element name="name" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="src" type="xsd:string" minOccurs="0"/>
					<xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
 				    <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
                    <xsd:element name="type" type="xsd:string" minOccurs="0"/>

					<!-- Accuracy info -->
					<xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
					<xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
					<xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
					<xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
					<xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
					<xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
					<xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>

					<!-- you can add your own privately defined rtept elements at the end of the rtept -->
                    <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
                  </xsd:sequence>
                  <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
                  <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="trk" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="name" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
              <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="src" type="xsd:string" minOccurs="0"/>	<!-- the source of this data: "Garmin eTrex", "Map", etc -->
			  <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
 			  <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
			  <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/>	<!-- GPS track number -->
	<!-- 	  <xsd:element name="type"			type="xsd:string"		minOccurs="0"/>  PROPOSED -->
			  <!-- you can add your own privately defined trk elements at the end of the trk -->
              <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
              <xsd:element name="trkseg" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>	<!-- elements must appear in this order -->
				    <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded">
					  <xsd:complexType>
					    <xsd:sequence>	<!-- elements must appear in this order -->

						  <!-- Position info -->
						  <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
						  <xsd:element name="course" type="gpx:degreesType" minOccurs="0"/>
						  <xsd:element name="speed" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
						  <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>

						  <!-- Description info -->
						  <xsd:element name="name" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="src" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
 						  <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
						  <xsd:element name="type" type="xsd:string" minOccurs="0"/>

						  <!-- Accuracy info -->
						  <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
						  <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
						  <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
						  <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>

						  <!-- you can add your own privately defined trkpt elements at the end of the trkpt -->
						  <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
					    </xsd:sequence>
					    <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
					    <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
					  </xsd:complexType>
				    </xsd:element>
			  	  </xsd:sequence>
			    </xsd:complexType>
			  </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
		<!-- you can add your own privately defined elements at the end of the GPX file -->
        <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      <xsd:attribute name="version" type="xsd:string" use="required" fixed="1.0"/>	<!-- version 1.0 -->
      <xsd:attribute name="creator" type="xsd:string" use="required"/>
    </xsd:complexType>
  </xsd:element>

  <!-- Other types used by GPX -->

  <xsd:simpleType name="latitudeType">
    <xsd:restriction base="xsd:decimal">
      <xsd:minInclusive value="-90.0"/>
      <xsd:maxInclusive value="90.0"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="longitudeType">
    <xsd:restriction base="xsd:decimal">
      <xsd:minInclusive value="-180.0"/>
      <xsd:maxInclusive value="180.0"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="degreesType">	<!-- for bearing, heading, course.  Units are degrees, true -->
    <xsd:restriction base="xsd:decimal">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="360.0"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="fixType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="none"/>	<!-- none means GPS had no fix.  To signify "the fix info is unknown, leave out the <fix> tag entirely --> 
      <xsd:enumeration value="2d"/>
      <xsd:enumeration value="3d"/>
      <xsd:enumeration value="dgps"/>
      <xsd:enumeration value="pps"/>		<!-- military signal used -->
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="dgpsStationType">
    <xsd:restriction base="xsd:integer">
      <xsd:minInclusive value="0"/>
      <xsd:maxInclusive value="1023"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="boundsType">	<!-- bounding rect for data in file -->
    <xsd:attribute name="minlat" type="gpx:latitudeType" use="required"/>
    <xsd:attribute name="minlon" type="gpx:longitudeType" use="required"/>
    <xsd:attribute name="maxlat" type="gpx:latitudeType" use="required"/>
    <xsd:attribute name="maxlon" type="gpx:longitudeType" use="required"/>
  </xsd:complexType>

  <xsd:simpleType name="emailType">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+"/>
    </xsd:restriction>
  </xsd:simpleType>

</xsd:schema>