No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0080.xml 25KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>User Location</title>
  10. <abstract>This specification defines an XMPP protocol extension for communicating information about the current geographical or physical location of an entity.</abstract>
  12. <number>0080</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XEP-0163</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>geoloc</shortname>
  23. <schemaloc>
  24. <url></url>
  25. </schemaloc>
  26. &hildjj;
  27. &stpeter;
  28. <revision>
  29. <version>1.9</version>
  30. <date>2015-12-01</date>
  31. <initials>ls</initials>
  32. <remark><p>Added &lt;altaccuracy/&gt; element.</p></remark>
  33. </revision>
  34. <revision>
  35. <version>1.8</version>
  36. <date>2014-05-07</date>
  37. <initials>ls</initials>
  38. <remark><p>Added &lt;tzo/&gt; element.</p></remark>
  39. </revision>
  40. <revision>
  41. <version>1.7</version>
  42. <date>2009-09-15</date>
  43. <initials>psa</initials>
  44. <remark><p>Added &lt;countrycode/&gt; element.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>1.6</version>
  48. <date>2008-10-29</date>
  49. <initials>psa/jjh</initials>
  50. <remark><p>Allowed empty geoloc element to signify a pause in publishing; added &lt;accuracy/&gt; element and deprecated &lt;error/&gt; element to change horizontal GPS error from arc minutes to meters, consistent with IMPS and other formats.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>1.5</version>
  54. <date>2008-01-30</date>
  55. <initials>jjh/psa</initials>
  56. <remark><p>Added speed element.</p></remark>
  57. </revision>
  58. <revision>
  59. <version>1.4</version>
  60. <date>2007-07-16</date>
  61. <initials>psa</initials>
  62. <remark><p>Renamed to User Location; corrected pubsub examples; recommended pubsub/PEP as transport for location information about human users; added uri element.</p></remark>
  63. </revision>
  64. <revision>
  65. <version>1.3</version>
  66. <date>2006-08-21</date>
  67. <initials>psa</initials>
  68. <remark><p>Folded in civil location from XEP-0112.</p></remark>
  69. </revision>
  70. <revision>
  71. <version>1.2</version>
  72. <date>2005-05-12</date>
  73. <initials>psa</initials>
  74. <remark><p>Changed xs:string to xs:decimal for bearing and specified that bearing is to be interpreted as decimal degrees relative to true north.</p></remark>
  75. </revision>
  76. <revision>
  77. <version>1.1</version>
  78. <date>2004-10-29</date>
  79. <initials>psa</initials>
  80. <remark><p>Changed xs:int to xs:decimal for altitude; changed MUST NOT to SHOULD NOT regarding inferences about accuracy.</p></remark>
  81. </revision>
  82. <revision>
  83. <version>1.0</version>
  84. <date>2004-10-12</date>
  85. <initials>psa</initials>
  86. <remark><p>Per a vote of the Jabber Council, advanced status to Draft; also added internationalization considerations and linked to an archived version of the GPS datum example.</p></remark>
  87. </revision>
  88. <revision>
  89. <version>0.9</version>
  90. <date>2004-10-12</date>
  91. <initials>psa</initials>
  92. <remark><p>Clarified several points in the implementation notes.</p></remark>
  93. </revision>
  94. <revision>
  95. <version>0.8</version>
  96. <date>2004-09-15</date>
  97. <initials>psa</initials>
  98. <remark><p>Specified error flow for IQ example.</p></remark>
  99. </revision>
  100. <revision>
  101. <version>0.7</version>
  102. <date>2004-04-25</date>
  103. <initials>psa</initials>
  104. <remark><p>Corrected several errors; added reference to XEP-0033.</p></remark>
  105. </revision>
  106. <revision>
  107. <version>0.6</version>
  108. <date>2004-02-19</date>
  109. <initials>psa</initials>
  110. <remark><p>Reverted from infobits to geoloc elements; moved physical address protocol back to XEP-0112.</p></remark>
  111. </revision>
  112. <revision>
  113. <version>0.5</version>
  114. <date>2003-12-16</date>
  115. <initials>psa</initials>
  116. <remark><p>Converted to use of infobits.</p></remark>
  117. </revision>
  118. <revision>
  119. <version>0.4</version>
  120. <date>2003-09-08</date>
  121. <initials>psa</initials>
  122. <remark><p>Merged in contents of XEP-0112.</p></remark>
  123. </revision>
  124. <revision>
  125. <version>0.3</version>
  126. <date>2003-08-21</date>
  127. <initials>psa</initials>
  128. <remark><p>Changed protocol name from 'location' to 'geoloc'.</p></remark>
  129. </revision>
  130. <revision>
  131. <version>0.2</version>
  132. <date>2003-07-29</date>
  133. <initials>psa</initials>
  134. <remark><p>Incorporated Standards list feedback; changed document type to Informational.</p></remark>
  135. </revision>
  136. <revision>
  137. <version>0.1</version>
  138. <date>2003-04-15</date>
  139. <initials>jjh</initials>
  140. <remark><p>Initial version.</p></remark>
  141. </revision>
  142. </header>
  143. <section1 topic='Introduction' anchor='intro'>
  144. <p>This document defines a format for capturing data about an entity's geographical location (geoloc). The format defined herein can describe most earthbound geographical locations, especially locations that may change fairly frequently. Potential uses for this approach include:</p>
  145. <ul>
  146. <li>Publishing location information to a set of subscribers.</li>
  147. <li>Querying another entity for its location.</li>
  148. <li>Sending location information to another entity.</li>
  149. <li>Attaching location information to presence.</li>
  150. </ul>
  151. <p>Geographical location is captured in terms of Global Positioning System (GPS) coordinates as well as civil location (city, street, building, etc.).</p>
  152. </section1>
  153. <section1 topic='Requirements' anchor='reqs'>
  154. <p>The format defined herein was designed to address the following requirements:</p>
  155. <ul>
  156. <li>It shall be possible to encapsulate location in terms of Global Positioning System (GPS) coordinates as well as civil location (city, street, building, etc.).</li>
  157. <li>The GPS encoding mechanism shall have a single set of units, so that receivers do not need to use heuristics to determine an entity's position.</li>
  158. <li>It shall be possible to specify the known amount of error in the GPS coordinates.</li>
  159. <li>It shall be possible to include a natural-language description of the location.</li>
  160. </ul>
  161. </section1>
  162. <section1 topic='Data Format' anchor='format'>
  163. <p>Information about the entity's location is provided by the entity and propagated on the network by the entity's associated application (usually a client). The information is structured by means of a &lt;geoloc/&gt; element that is qualified by the '' namespace; the location information itself is provided as the XML character data of the following child elements:</p>
  164. <table caption='Child Elements'>
  165. <tr>
  166. <th>Element Name</th>
  167. <th>Datatype</th>
  168. <th>Definition</th>
  169. <th>Example</th>
  170. </tr>
  171. <tr>
  172. <td>accuracy</td>
  173. <td>xs:decimal</td>
  174. <td>Horizontal GPS error in meters; this element obsoletes the &lt;error/&gt; element</td>
  175. <td>10</td>
  176. </tr>
  177. <tr>
  178. <td>alt</td>
  179. <td>xs:decimal</td>
  180. <td>Altitude in meters above or below sea level</td>
  181. <td>1609</td>
  182. </tr>
  183. <tr>
  184. <td>altaccuracy</td>
  185. <td>xs:decimal</td>
  186. <td>Vertical GPS error in meters</td>
  187. <td>10</td>
  188. </tr>
  189. <tr>
  190. <td>area</td>
  191. <td>xs:string</td>
  192. <td>A named area such as a campus or neighborhood</td>
  193. <td>Central Park</td>
  194. </tr>
  195. <tr>
  196. <td>bearing</td>
  197. <td>xs:decimal</td>
  198. <td>GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north <note>It is the responsibility of the receiver to translate bearing into decimal degrees relative to magnetic north, if desired.</note></td>
  199. <td>&#160;</td>
  200. </tr>
  201. <tr>
  202. <td>building</td>
  203. <td>xs:string</td>
  204. <td>A specific building on a street or in an area</td>
  205. <td>The Empire State Building</td>
  206. </tr>
  207. <tr>
  208. <td>country</td>
  209. <td>xs:string</td>
  210. <td>The nation where the user is located</td>
  211. <td>United States</td>
  212. </tr>
  213. <tr>
  214. <td>countrycode</td>
  215. <td>xs:string</td>
  216. <td>The ISO 3166 two-letter country code</td>
  217. <td>US</td>
  218. </tr>
  219. <tr>
  220. <td>datum</td>
  221. <td>xs:string</td>
  222. <td>GPS datum <note>If datum is not included, receiver MUST assume WGS84; receivers MUST implement WGS84; senders MAY use another datum, but it is not recommended.</note></td>
  223. <td>&#160;</td>
  224. </tr>
  225. <tr>
  226. <td>description</td>
  227. <td>xs:string</td>
  228. <td>A natural-language name for or description of the location</td>
  229. <td>Bill's house</td>
  230. </tr>
  231. <tr>
  232. <td>error</td>
  233. <td>xs:decimal</td>
  234. <td>Horizontal GPS error in arc minutes; this element is deprecated in favor of &lt;accuracy/&gt;</td>
  235. <td>290.8882087</td>
  236. </tr>
  237. <tr>
  238. <td>floor</td>
  239. <td>xs:string</td>
  240. <td>A particular floor in a building</td>
  241. <td>102</td>
  242. </tr>
  243. <tr>
  244. <td>lat</td>
  245. <td>xs:decimal</td>
  246. <td>Latitude in decimal degrees North</td>
  247. <td>39.75</td>
  248. </tr>
  249. <tr>
  250. <td>locality</td>
  251. <td>xs:string</td>
  252. <td>A locality within the administrative region, such as a town or city</td>
  253. <td>New York City</td>
  254. </tr>
  255. <tr>
  256. <td>lon</td>
  257. <td>xs:decimal</td>
  258. <td>Longitude in decimal degrees East</td>
  259. <td>-104.99</td>
  260. </tr>
  261. <tr>
  262. <td>postalcode</td>
  263. <td>xs:string</td>
  264. <td>A code used for postal delivery</td>
  265. <td>10118</td>
  266. </tr>
  267. <tr>
  268. <td>region</td>
  269. <td>xs:string</td>
  270. <td>An administrative region of the nation, such as a state or province</td>
  271. <td>New York</td>
  272. </tr>
  273. <tr>
  274. <td>room</td>
  275. <td>xs:string</td>
  276. <td>A particular room in a building</td>
  277. <td>Observatory</td>
  278. </tr>
  279. <tr>
  280. <td>speed</td>
  281. <td>xs:decimal</td>
  282. <td>The speed at which the entity is moving, in meters per second</td>
  283. <td>52.69</td>
  284. </tr>
  285. <tr>
  286. <td>street</td>
  287. <td>xs:string</td>
  288. <td>A thoroughfare within the locality, or a crossing of two thoroughfares</td>
  289. <td>350 Fifth Avenue / 34th and Broadway</td>
  290. </tr>
  291. <tr>
  292. <td>text</td>
  293. <td>xs:string</td>
  294. <td>A catch-all element that captures any other information about the location</td>
  295. <td>Northwest corner of the lobby</td>
  296. </tr>
  297. <tr>
  298. <td>timestamp</td>
  299. <td>xs:dateTime</td>
  300. <td>UTC timestamp specifying the moment when the reading was taken (MUST conform to the DateTime profile of &xep0082;)</td>
  301. <td>2004-02-19T21:12Z</td>
  302. </tr>
  303. <tr>
  304. <td>tzo</td>
  305. <td>xs:string</td>
  306. <td>The time zone offset from UTC for the current location (MUST adhere to the Time Zone Definition (TZD) specified in &xep0082;)</td>
  307. <td>-07:00</td>
  308. </tr>
  309. <tr>
  310. <td>uri</td>
  311. <td>xs:anyURI</td>
  312. <td>A URI or URL pointing to information about the location</td>
  313. <td></td>
  314. </tr>
  315. </table>
  316. <p>NOTE: The datatypes specified above are defined in &w3xmlschema2;.</p>
  317. </section1>
  318. <section1 topic='Recommended Transport' anchor='transport'>
  319. <p>Location information about human users SHOULD be communicated and transported by means of &xep0060; or the subset thereof specified in &xep0163; (the examples below assume that the user's XMPP server supports PEP, thus the publish request lacks a 'to' address and the notification message has a 'from' address of the user's bare JID).</p>
  320. <p>Although the XMPP publish-subscribe extension is the preferred means for transporting location information about human users, applications that do not involve human users (e.g., device tracking) MAY use other transport methods; however, because location information is not pure presence information and can change independently of network availability, it SHOULD NOT be provided as an extension to &PRESENCE;.</p>
  321. <section2 topic='Entity publishes location via PEP' anchor='usecases-pubsub'>
  322. <example caption='Entity publishes location'><![CDATA[
  323. <iq type='set' from='portia@merchantofvenice.lit/pda' id='publish1'>
  324. <pubsub xmlns=''>
  325. <publish node=''>
  326. <item>
  327. <geoloc xmlns='' xml:lang='en'>
  328. <accuracy>20</accuracy>
  329. <country>Italy</country>
  330. <lat>45.44</lat>
  331. <locality>Venice</locality>
  332. <lon>12.33</lon>
  333. </geoloc>
  334. </item>
  335. </publish>
  336. </pubsub>
  337. </iq>
  338. ]]></example>
  339. <example caption='Subscriber receives event with payload'><![CDATA[
  340. <message from='portia@merchantofvenice.lit'
  341. to='bassanio@merchantofvenice.lit'>
  342. <event xmlns=''>
  343. <items node=''>
  344. <item id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'>
  345. <geoloc xmlns='' xml:lang='en'>
  346. <accuracy>20</accuracy>
  347. <country>Italy</country>
  348. <lat>45.44</lat>
  349. <locality>Venice</locality>
  350. <lon>12.33</lon>
  351. </geoloc>
  352. </item>
  353. </items>
  354. </event>
  355. </message>
  356. ]]></example>
  357. <p>In order to indicate that the user is no longer publishing any location information, the user's client shall send an empty &lt;geoloc/&gt; element, which can be considered a "stop command" for geolocation:</p>
  358. <example caption='User stops publishing geolocation information'><![CDATA[
  359. <iq from='portia@merchantofvenice.lit/pda'
  360. id='publish2'
  361. type='set'>
  362. <pubsub xmlns=''>
  363. <publish node=''>
  364. <item>
  365. <geoloc xmlns=''/>
  366. </item>
  367. </publish>
  368. </pubsub>
  369. </iq>
  370. ]]></example>
  371. <example caption='Subscriber receives empty event'><![CDATA[
  372. <message from='portia@merchantofvenice.lit'
  373. to='bassanio@merchantofvenice.lit'>
  374. <event xmlns=''>
  375. <items node=''>
  376. <item id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'>
  377. <geoloc xmlns=''/>
  378. </item>
  379. </items>
  380. </event>
  381. </message>
  382. ]]></example>
  383. </section2>
  384. </section1>
  385. <section1 topic='Implementation Notes' anchor='impl'>
  386. <p>Avoid "Mars probe" issues: as specified in Table 1, the units for &lt;lat/&gt; and &lt;lon/&gt; MUST be decimal degrees (where South and West are negative, North and East are positive), the units for &lt;alt/&gt; MUST be meters above or below sea level, and the units for &lt;accuracy/&gt; MUST be meters. <note>The &lt;accuracy/&gt; element obsoletes the older &lt;error/&gt; element, which specified units of arc minutes intead of meters.</note></p>
  387. <p>In applications where updates are sent whenever there is a certain distance change in location, those applications SHOULD account for time as well, to avoid rate-limiting when the user is (for example) on a jet plane. One possible way to do this would be to send updates at most once per minute of time (every time 60 seconds have elapsed).</p>
  388. <p>Inferences SHOULD NOT be made about accuracy from the number of digits specified in the location or altitude.</p>
  389. <p>Why the datum madness? See &lt;<link url=''></link>&gt; for an example.</p>
  390. <p>An entity can provide a GPS path by publishing a series of items (i.e., multiple pubsub events) with appropriate values of the &lt;timestamp/&gt; element.</p>
  391. </section1>
  392. <section1 topic='Mapping to Other Formats' anchor='mapping'>
  393. <p>There are many XML data formats for physical location or address information. It is beyond the scope of this document to provide a mapping from the extension defined herein to every such format. However, it would be valuable to provide a mapping from the XMPP format to the formats used in other presence or extended presence protocols. The two main protocols of interest are:</p>
  394. <ol>
  395. <li><p>The Wireless Village (now "IMPS") specifications for mobile instant messaging; these specifications define a presence attribute for address information as encapsulated in the IMPS "Address" element <note>The Wireless Village Initiative: Presence Attributes v1.1 (WV-029); for further information, visit &lt;<link url=''></link>&gt;.</note>.</p></li>
  396. <li><p>The SIP-based SIMPLE specifications; in particular, the IETF's GEOPRIV Working Group has defined an extension to the IETF's &pidf; for location information, as specified in &rfc4119; (also known as "PIDF-LO").</p></li>
  397. </ol>
  398. <p>The following table also maps the format defined herein to the vCard XML format specified in &xep0054;.</p>
  399. <table caption='Mapping XMPP Physical Location to IMPS, PIDF-LO, and vCard'>
  400. <tr>
  401. <th>XMPP</th>
  402. <th>Wireless Village / IMPS</th>
  403. <th>SIMPLE (PIDF-LO)</th>
  404. <th>vCard XML</th>
  405. </tr>
  406. <tr>
  407. <td align='center'>&lt;country/&gt;</td>
  408. <td align='center'>&lt;Country/&gt;</td>
  409. <td align='center'>&lt;country/&gt;</td>
  410. <td align='center'>&lt;CTRY/&gt;
  411. <note>As noted in XEP-0054, the XML vCard format defined in draft-dawson-vcard-xml-dtd-01 specified a &lt;COUNTRY/&gt; element rather than a &lt;CTRY/&gt; element; refer to XEP-0054 for details.</note>
  412. </td>
  413. </tr>
  414. <tr>
  415. <td align='center'>&lt;region/&gt;</td>
  416. <td align='center'>--</td>
  417. <td align='center'>&lt;A1/&gt; and/or &lt;A2/&gt;</td>
  418. <td align='center'>&lt;REGION/&gt;</td>
  419. </tr>
  420. <tr>
  421. <td align='center'>&lt;locality/&gt;</td>
  422. <td align='center'>&lt;City/&gt;</td>
  423. <td align='center'>&lt;A3/&gt;</td>
  424. <td align='center'>&lt;LOCALITY/&gt;</td>
  425. </tr>
  426. <tr>
  427. <td align='center'>&lt;area/&gt;</td>
  428. <td align='center'>&lt;NamedArea/&gt;</td>
  429. <td align='center'>&lt;A4/&gt; and/or &lt;A5/&gt;</td>
  430. <td align='center'>--</td>
  431. </tr>
  432. <tr>
  433. <td align='center'>&lt;street/&gt;</td>
  434. <td align='center'>&lt;Street/&gt;
  435. <note>The IMPS specification also enables one to define an intersection (e.g., "Broadway and 34th Street") as the combination of a &lt;Crossing1/&gt; element (e.g., "Broadway") and a &lt;Crossing2/&gt; element (e.g., "34th Street"). To map from IMPS to XMPP, an application SHOULD map such a combination to one XMPP &lt;street/&gt; element.</note>
  436. </td>
  437. <td align='center'>&lt;A6/&gt;
  438. <note>The PIDF-LO format provides information elements for much more granular control over a traditional street address; in PIDF-LO the &lt;A6/&gt; element is the street name only, and further information is provided in distinct elements for a leading street direction (e.g., "N"), trailing street suffix (e.g., "SW"), street suffix (e.g., "Avenue"), house number (e.g., "909"), and house number suffix (e.g., "1/2"). To map from PIDF-LO to XMPP, an application SHOULD construct the complete street address from the PIDF-LO elements (&lt;A6/&gt;, &lt;PRD/&gt;, &lt;POD/&gt;, &lt;STS/&gt;, &lt;HNO/&gt;, and &lt;HNS/&gt;) and map the result to one XMPP &lt;street/&gt; element.</note>
  439. </td>
  440. <td align='center'>&lt;STREET/&gt;</td>
  441. </tr>
  442. <tr>
  443. <td align='center'>&lt;building/&gt;</td>
  444. <td align='center'>&lt;Building/&gt;</td>
  445. <td align='center'>&lt;LMK/&gt;</td>
  446. <td align='center'>--</td>
  447. </tr>
  448. <tr>
  449. <td align='center'>&lt;floor/&gt;</td>
  450. <td align='center'>--</td>
  451. <td align='center'>&lt;FLR/&gt;</td>
  452. <td align='center'>--</td>
  453. </tr>
  454. <tr>
  455. <td align='center'>&lt;room/&gt;</td>
  456. <td align='center'>--</td>
  457. <td align='center'>--</td>
  458. <td align='center'>--</td>
  459. </tr>
  460. <tr>
  461. <td align='center'>&lt;postalcode/&gt;</td>
  462. <td align='center'>--</td>
  463. <td align='center'>&lt;PC/&gt;</td>
  464. <td align='center'>&lt;PCODE/&gt;</td>
  465. </tr>
  466. <tr>
  467. <td align='center'>&lt;text/&gt;</td>
  468. <td align='center'>&lt;FreeTextLocation/&gt;</td>
  469. <td align='center'>&lt;LOC/&gt;</td>
  470. <td align='center'>&lt;EXTADR/&gt;</td>
  471. </tr>
  472. <tr>
  473. <td align='center'>&lt;accuracy/&gt;</td>
  474. <td align='center'>&lt;Accuracy/&gt;
  475. <note>This element specifies accuracy in meters. When mapping from IMPS to XMPP, the IMPS &lt;Accuracy/&gt; element SHOULD be mapped to the XMPP &lt;accuracy/&gt; element (which specifies accuracy in meters), not the deprecated &lt;error/&gt; element (which specified accuracy in arc minutes).</note>
  476. </td>
  477. <td align='center'>--</td>
  478. <td align='center'>--</td>
  479. </tr>
  480. <tr>
  481. <td align='center'>--</td>
  482. <td align='center'>--</td>
  483. <td align='center'>&lt;NAM/&gt;
  484. <note>This element provides a name for the location, e.g., a certain store in a building. This SHOULD be mapped to the XMPP &lt;text/&gt; element.</note>
  485. </td>
  486. <td align='center'>--</td>
  487. </tr>
  488. </table>
  489. </section1>
  490. <section1 topic='Internationalization Considerations' anchor='i18n'>
  491. <p>Because the character data contained in &lt;geoloc/&gt; child elements of type 'xs:string' is intended to be readable by humans, the &lt;geoloc/&gt; element SHOULD possess an 'xml:lang' attribute specifying the natural language of such character data.</p>
  492. </section1>
  493. <section1 topic='Security Considerations' anchor='security'>
  494. <p>It is imperative to control access to location information, at least by default. Imagine that a stalker got unauthorized access to this information, with enough accuracy and timeliness to be able to find the target person. This scenario could lead to loss of life, so please take access control checks seriously. If an error is deliberately added to a location, the error SHOULD be the same for all receivers, to minimize the likelihood of triangulation. In the case of deliberate error, the &lt;accuracy/&gt; element SHOULD NOT be included.</p>
  495. </section1>
  496. <section1 topic='IANA Considerations' anchor='iana'>
  497. <p>This document requires no interaction with &IANA;.</p>
  498. </section1>
  499. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  500. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  501. <p>The &REGISTRAR; includes '' to its registry of protocol namespaces.</p>
  502. </section2>
  503. </section1>
  504. <section1 topic='XML Schema' anchor='schema'>
  505. <code><![CDATA[
  506. <?xml version='1.0' encoding='UTF-8'?>
  507. <xs:schema
  508. xmlns:xs=''
  509. targetNamespace=''
  510. xmlns=''
  511. elementFormDefault='qualified'>
  512. <xs:annotation>
  513. <xs:documentation>
  514. The protocol documented by this schema is defined in
  515. XEP-0080:
  516. </xs:documentation>
  517. </xs:annotation>
  518. <xs:element name='geoloc'>
  519. <xs:complexType>
  520. <xs:sequence minOccurs='0'>
  521. <xs:element name='accuracy' minOccurs='0' type='xs:decimal'/>
  522. <xs:element name='alt' minOccurs='0' type='xs:decimal'/>
  523. <xs:element name='altaccuracy' minOccurs='0' type='xs:decimal'/>
  524. <xs:element name='area' minOccurs='0' type='xs:string'/>
  525. <xs:element name='bearing' minOccurs='0' type='xs:decimal'/>
  526. <xs:element name='building' minOccurs='0' type='xs:string'/>
  527. <xs:element name='country' minOccurs='0' type='xs:string'/>
  528. <xs:element name='countrycode' minOccurs='0' type='xs:string'/>
  529. <xs:element name='datum' minOccurs='0' type='xs:string'/>
  530. <xs:element name='description' minOccurs='0' type='xs:string'/>
  531. <xs:element name='error' minOccurs='0' type='xs:decimal'/>
  532. <xs:element name='floor' minOccurs='0' type='xs:string'/>
  533. <xs:element name='lat' minOccurs='0' type='xs:decimal'/>
  534. <xs:element name='locality' minOccurs='0' type='xs:string'/>
  535. <xs:element name='lon' minOccurs='0' type='xs:decimal'/>
  536. <xs:element name='postalcode' minOccurs='0' type='xs:string'/>
  537. <xs:element name='region' minOccurs='0' type='xs:string'/>
  538. <xs:element name='room' minOccurs='0' type='xs:string'/>
  539. <xs:element name='speed' minOccurs='0' type='xs:decimal'/>
  540. <xs:element name='street' minOccurs='0' type='xs:string'/>
  541. <xs:element name='text' minOccurs='0' type='xs:string'/>
  542. <xs:element name='timestamp' minOccurs='0' type='xs:dateTime'/>
  543. <xs:element name='tzo' minOccurs='0' type='xs:string'/>
  544. <xs:element name='uri' minOccurs='0' type='xs:anyURI'/>
  545. </xs:sequence>
  546. <xs:attribute ref='xml:lang' use='optional'/>
  547. </xs:complexType>
  548. </xs:element>
  549. </xs:schema>
  550. ]]></code>
  551. </section1>
  552. </xep>