mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 18:22:24 -05:00
ProtoXEP geolog-dataform v0.0.3: Updated version, added 'geo:' datatypes to support 'text-single' use case.
This commit is contained in:
parent
a9da7f313b
commit
71ec1a15fd
@ -1,109 +1,205 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
||||||
<!ENTITY % ents SYSTEM 'xep.ent'>
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
||||||
%ents;
|
%ents;
|
||||||
]>
|
]>
|
||||||
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
||||||
<xep>
|
<xep>
|
||||||
<header>
|
<header>
|
||||||
<title>Data Forms Geolocation Element</title>
|
<title>Data Forms Geolocation Element</title>
|
||||||
<abstract>This specification defines an XMPP protocol extension for including geolocation data in <cite>XEP-0004</cite> <cite>Data Forms</cite>.</abstract>
|
<abstract>This specification defines an XMPP protocol extension for including geolocation data in XEP-0004 data forms.</abstract>
|
||||||
&LEGALNOTICE;
|
&LEGALNOTICE;
|
||||||
<number>xxxx</number>
|
<number>xxxx</number>
|
||||||
<status>ProtoXEP</status>
|
<status>ProtoXEP</status>
|
||||||
<type>Standards Track</type>
|
<type>Standards Track</type>
|
||||||
<sig>Standards</sig>
|
<sig>Standards</sig>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<spec>XMPP Core</spec>
|
<spec>XMPP Core</spec>
|
||||||
<spec>XEP-0004</spec>
|
<spec>XEP-0004</spec>
|
||||||
<spec>XEP-0080</spec>
|
<spec>XEP-0080</spec>
|
||||||
<spec>XEP-0122</spec>
|
<spec>XEP-0122</spec>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<supersedes>None</supersedes>
|
<supersedes/>
|
||||||
<supersededby>None</supersededby>
|
<supersededby/>
|
||||||
<shortname>geolocation-element</shortname>
|
<shortname>geolocation-element</shortname>
|
||||||
<schemaloc>
|
<schemaloc>
|
||||||
<url>http://www.xmpp.org/schemas/geolocation-element.xsd</url>
|
<url>http://www.xmpp.org/schemas/geolocation-element.xsd</url>
|
||||||
</schemaloc>
|
</schemaloc>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Michael</firstname>
|
<firstname>Michael</firstname>
|
||||||
<surname>Laukner</surname>
|
<surname>Laukner</surname>
|
||||||
<email>laukner@gmail.com</email>
|
<email>laukner@gmail.com</email>
|
||||||
<jid>laukner@jabber.org</jid>
|
<jid>laukner@jabber.org</jid>
|
||||||
</author>
|
</author>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.0.2</version>
|
<version>0.0.3</version>
|
||||||
<date>2014-06-21</date>
|
<date>2014-06-28</date>
|
||||||
<initials>ml</initials>
|
<initials>ml</initials>
|
||||||
<remark>
|
<remark>
|
||||||
<p>Initial version, borrowing from XEP-0221 and XEP-0137.</p>
|
<p>Updated version, added 'geo:' datatypes to support 'text-single' use case.</p>
|
||||||
</remark>
|
</remark>
|
||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.0.1</version>
|
<version>0.0.2</version>
|
||||||
<date>2014-06-11</date>
|
<date>2014-06-25</date>
|
||||||
<initials>ml</initials>
|
<initials>ml</initials>
|
||||||
<remark>
|
<remark>
|
||||||
<p>Initial version, borrowing from XEP-0221.</p>
|
<p>Updated version, added XEP-0122 'geo:' datatypes.</p>
|
||||||
</remark>
|
</remark>
|
||||||
</revision>
|
</revision>
|
||||||
</header>
|
<revision>
|
||||||
<section1 topic="Introduction" anchor="intro">
|
<version>0.0.1</version>
|
||||||
<p>In certain protocols that make use of &xep0004;, it can be helpful to include geolocation data. One example of such a "using protocol" is &xep0346;. This document defines a method for including geolocation data in a <cite>Data Form</cite> for something you manage and want to publish. This XEP leaves it open to developers how such a <geoloc/> form element will be rendered; possibilities might include editing Latitude and Longitude manually or through a rendered map.</p>
|
<date>2014-06-11</date>
|
||||||
</section1>
|
<initials>ml</initials>
|
||||||
<section1 topic='Requirements' anchor='requirements'>
|
<remark>
|
||||||
<p>This proposal addresses the following requirements:</p>
|
<p>Initial version, borrowing from XEP-0221.</p>
|
||||||
<ul>
|
</remark>
|
||||||
<li>Integrate geolocation data with &xep0004;.</li>
|
</revision>
|
||||||
<li>Allow a potential receiver (rather than the sender) to validate geolocation data.</li>
|
</header>
|
||||||
</ul>
|
<section1 topic='Introduction' anchor='intro'>
|
||||||
</section1>
|
<p>In certain protocols that make use of &xep0004;, it can be helpful to include geolocation data. One example of such a "using protocol" is &xep0346;. This document defines a method for including geolocation data in a <cite>Data Form</cite> for something you manage and want to publish. This XEP leaves it open to developers how such a <geoloc/> form element will be rendered; possibilities might include editing Latitude and Longitude manually or through a rendered map.</p>
|
||||||
<section1 topic="Integrate Geolocation Element" anchor="geolocation">
|
<p>There may also be the need to gather location data from both humans (using a GUI format) and computer processes (using a pre-defined but flexible format). This document defines a flexible mechanism for the ®ISTRAR; to standardize geographical location field names in data forms, thus enabling XMPP clients to process location fields in forms while giving protocol authors a way to specify additional location data types for non-GUI processors to determine the semantic meanings of a location field.</p>
|
||||||
<p>The root element for geolocation data is <geoloc/> as defined in &xep0080;. The information is structured by means of a <geoloc /> element that is qualified by the 'http://jabber.org/protocol/geoloc' namespace. The <geoloc/> element MUST be contained within a <field/> element qualified by the 'jabber:x:data' namespace.</p>
|
</section1>
|
||||||
<p>The following example is provided only for the purpose of illustration; consult the specifications for using protocols (e.g., &xep0080;) to see canonical examples.</p>
|
<section1 topic='Requirements' anchor='requirements'>
|
||||||
<example caption="Inclusion in Data Form"><![CDATA[<x xmlns='jabber:x:data' type='form'>
|
<p>This proposal addresses the following requirements:</p>
|
||||||
[ ... ]
|
<ul>
|
||||||
<field var='location'>
|
<li>Integrate geolocation data with XEP-0004.</li>
|
||||||
<geoloc xmlns="http://jabber.org/protocol/geoloc">
|
<li>Allow a potential receiver (rather than the sender) to validate geolocation data.</li>
|
||||||
<text>Venice, Italy</text>
|
</ul>
|
||||||
<locality>Venice</locality>
|
</section1>
|
||||||
<country>Italy</country>
|
<section1 topic='Integrate Geolocation Element with XEP-0004' anchor='geolocation'>
|
||||||
<lat>45.44</lat>
|
<p>The root element for geolocation data is <geoloc/> as defined in &xep0080;. The information is structured by means of a <geoloc/> element that is qualified by the 'http://jabber.org/protocol/geoloc' namespace. The <geo/> element MUST be contained within a <field/> element qualified by the 'jabber:x:data' namespace.</p>
|
||||||
<lon>12.33</lon>
|
<p>The following example is provided only for the purpose of illustration; consult the specifications for using protocols (e.g., XEP-0080) to see canonical examples.</p>
|
||||||
</geoloc>
|
<example caption='Inclusion in Data Form'><![CDATA[<x xmlns='jabber:x:data' type='form'>
|
||||||
</field>
|
[ ... ]
|
||||||
[ ... ]
|
<field var='location'>
|
||||||
</x>]]></example>
|
<geoloc xmlns="http://jabber.org/protocol/geoloc">
|
||||||
</section1>
|
<text>Venice, Italy</text>
|
||||||
<section1 topic="Integration with Data Forms Validation (XEP-0122)" anchor="validation">
|
<locality>Venice</locality>
|
||||||
<p>To indicate that a 'geoloc' datatype is expected to be displayed by a receiving entity, the sender MUST use the 'geoloc' datatype as specified in &xep0122;.</p>
|
<country>Italy</country>
|
||||||
<p>When submitting a form, a field's value(s) MUST be validated by the receiving entity based on the 'geoloc' datatype identifier(s).</p>
|
<lat>45.44</lat>
|
||||||
<p>Also, the submitter MUST provide a 'geoloc' element for each element within the data form.</p>
|
<lon>12.33</lon>
|
||||||
<example caption="Data Forms Field Validation"><![CDATA[
|
</geoloc>
|
||||||
<field var='where' label='contact location'>
|
</field>
|
||||||
<validate xmlns='http://jabber.org/protocol/xdata-validate' datatype='geoloc'>
|
[ ... ]
|
||||||
<basic/>
|
</x>]]></example>
|
||||||
</validate>
|
</section1>
|
||||||
</field>]]></example>
|
<section1 topic='Allow Receiver to Valdidate Geolocation Data' anchor='validation'>
|
||||||
<p>If a form-submitting entity receives a field type it does not understand, the 'text-single' field type from &xep0004; MUST be assumed.</p>
|
<p>All elements associated with location fields MUST be qualified by the 'http://jabber.org/protocol/geoloc' namespace. The use of namespace prefixes is RECOMMENDED for large forms, to reduce the data size. To maintain the highest level of compatibility, implementations sending the form using prefixes SHOULD use the namespace prefix "geo:", and SHOULD declare the namespace prefix mapping in the ancestor >x xmlns='jabber:x:data'/< element:</p>
|
||||||
</section1>
|
<p>The following example is provided only for the purpose of illustration; consult the specifications for using protocols (e.g. XEP-0080, XEP-0122) to see canonical examples.</p>
|
||||||
<section1 topic="Security Considerations" anchor="security">
|
<example caption='Validation of Geolocation Data'><![CDATA[<x xmlns='jabber:x:data'
|
||||||
<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 <accuracy /> element SHOULD NOT be included.</p>
|
xmlns:geo= http://jabber.org/protocol/geoloc'
|
||||||
</section1>
|
xmlns:xdv='http://jabber.org/protocols/xdata-validate'
|
||||||
<section1 topic="IANA Considerations" anchor="iana">
|
type='form'>
|
||||||
<p>This document requires no interaction with the &IANA;.</p>
|
<title>Sample Location Form</title>
|
||||||
</section1>
|
<instructions>
|
||||||
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
|
Please provide information for the following location fields...
|
||||||
<section2 topic="Protocol Namespaces" anchor="ns">
|
</instructions>
|
||||||
<p>
|
<field type='text-single' var='name' label='Event Name'/>
|
||||||
The ®ISTRAR; already includes 'http://jabber.org/protocol/geoloc' in its registry of protocol namespaces (see &NAMESPACES;).
|
<field type='text-single' var='time' label='Event Date/Time'>
|
||||||
</p>
|
<xdv:validate datatype='xs:dateTime'>
|
||||||
</section2>
|
<basic/>
|
||||||
<section2 topic='Data Form Validation Datatypes' anchor='registrar.xdata-validate'>
|
</xdv:validate>
|
||||||
<p>The XMPP Registrar includes 'http://jabber.org/protocol/geoloc' in its registry of Data Forms Validation Datatype Prefixes.</p>
|
</field>
|
||||||
</section2>
|
<field type='text-single' var='latitude' label='Latitude'>
|
||||||
</section1>
|
<xdv:validate datatype='geo:lat'>
|
||||||
<section1 topic="XML Schema" anchor="schema">
|
<basic/>
|
||||||
<p>As this document only defines semantics for existing protocol, additional schemas are not required.</p>
|
</xdv:validate>
|
||||||
</section1>
|
</field>
|
||||||
</xep>
|
<field type='text-single' var='longitude' label='Longitude'>
|
||||||
|
<xdv:validate datatype='geo:lon'>
|
||||||
|
<basic/>
|
||||||
|
</xdv:validate>
|
||||||
|
</field>
|
||||||
|
</x>]]></example>
|
||||||
|
<section2 topic='Location Datatypes for Data Forms' anchor='location_fields'>
|
||||||
|
<p>The integration with Data Forms is accomplished via the datatypes specified in &xep0122;. Each datatype is specific to the profile desired. The sender MUST use the 'geo:' datatypes as specified in XEP-0122. When submitting a form, a field's value(s) MUST be validated by the receiving entity based on the 'geo:' datatype identifier(s). Also, the submitter MUST provide a 'geo:' element for each location element within the data form. If a form-submitting entity receives a field type it does not understand, the 'text-single' field type from XEP-0004 MUST be assumed.</p>
|
||||||
|
</section2>
|
||||||
|
</section1>
|
||||||
|
<section1 topic='Security Considerations' anchor='security'>
|
||||||
|
<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 <accuracy /> element SHOULD NOT be included.</p>
|
||||||
|
</section1>
|
||||||
|
<section1 topic='IANA Considerations' anchor='iana'>
|
||||||
|
<p>This document requires no interaction with the &IANA;.</p>
|
||||||
|
</section1>
|
||||||
|
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||||
|
<section2 topic='Protocol Namespaces' anchor='ns'>
|
||||||
|
<p>
|
||||||
|
The ®ISTRAR; already includes 'http://jabber.org/protocol/geoloc' in its registry of protocol namespaces (see &NAMESPACES;).
|
||||||
|
</p>
|
||||||
|
</section2>
|
||||||
|
<section2 topic='Location Fields and Data Form Validation Datatypes' anchor='registrar.geo.xep'>
|
||||||
|
<p>The XMPP Registrar includes 'geo:' in its registry of Data Forms Validation Datatype Prefixes.</p>
|
||||||
|
<p>Normally, each geographic format that wishes to be considered for use with Data Forms MUST register its own datatype qualified by the "geo:" prefix. However, this document provides an initial seed, based on the currently assumed formats. The following datatypes shall be registered for use with Data Forms Validation:</p>
|
||||||
|
<code caption='Latitude Validation Datatype Registry Submission'><![CDATA[
|
||||||
|
<datatype>
|
||||||
|
<name>geo:lat</name>
|
||||||
|
<desc>Datatype for publishing the latitude of a geographic location</desc>
|
||||||
|
<doc>XEP-0080</doc>
|
||||||
|
</datatype>
|
||||||
|
]]></code>
|
||||||
|
<example caption='Validation of a XEP-0080 Latitude Field'><![CDATA[
|
||||||
|
<field type='text-single' var='latitude' label='Latitude'>
|
||||||
|
<xdv:validate datatype='geo:lat'>
|
||||||
|
<range min='-90'
|
||||||
|
max='90'/>
|
||||||
|
</xdv:validate>
|
||||||
|
<value>45.44</value>
|
||||||
|
</field>]]></example>
|
||||||
|
|
||||||
|
<code caption='Longitude Validation Datatype Registry Submission'><![CDATA[
|
||||||
|
<datatype>
|
||||||
|
<name>geo:lon</name>
|
||||||
|
<desc>Datatype for publishing the longitude of a geographic location</desc>
|
||||||
|
<doc>XEP-0080</doc>
|
||||||
|
</datatype>
|
||||||
|
]]></code>
|
||||||
|
<example caption='Validation of XEP-0080 Longitude Field'><![CDATA[
|
||||||
|
<field type='text-single' var='longitude' label='Longitude'>
|
||||||
|
<xdv:validate datatype='geo:lon'>
|
||||||
|
<range min='-180'
|
||||||
|
max='180'/>
|
||||||
|
</xdv:validate>
|
||||||
|
<value>12.33</value>
|
||||||
|
</field>]]></example>
|
||||||
|
</section2>
|
||||||
|
|
||||||
|
<section2 topic='Text Field and Data Form Validation Datatypes' anchor='registrar.geo.text'>
|
||||||
|
<p>The XMPP Registrar MAY include 'geo:' datatypes in its registry of Data Forms Validation Datatypes, which can be used with the 'text-single' field type from XEP-0004.</p>
|
||||||
|
|
||||||
|
<code caption='DMS Data Forms Validation Datatype Registry Submission'><![CDATA[
|
||||||
|
<datatype>
|
||||||
|
<name>geo:dms</name>
|
||||||
|
<desc>Datatype for publishing a degrees, minutes, and seconds (DMS) location</desc>
|
||||||
|
<doc>Degree Minutes and Seconds, 'http://en.wikipedia.org/wiki/Geographic_coordinate_system'.</doc>
|
||||||
|
</datatype>
|
||||||
|
]]></code>
|
||||||
|
<example caption='Validation of a DMS Location Field'><![CDATA[
|
||||||
|
<field type='text-single' var='dms_location'>
|
||||||
|
<xdv:validate datatype='geo:dms'/>
|
||||||
|
<regex>([-|\\+]?\\d{1,3}[d|D|\u00B0|\\s](\\s*\\d{1,2}['|\u2019|\\s])?(\\s*\\d{1,2}[\"|\u201d])?\\s*[N|n|S|s]?)?(\\s*|,|,\\s*)?([-|\\+]?\\d+?(\\.\\d+?)??\\s*[E|e|W|w]??)</regex>
|
||||||
|
</xdv:validate>
|
||||||
|
<value>52d18'24.4775"N 0d52'44.0625"W</value>
|
||||||
|
</field>]]></example>
|
||||||
|
|
||||||
|
<code caption='MGRS Data Forms Validation Datatype Registry Submission'><![CDATA[
|
||||||
|
<datatype>
|
||||||
|
<name>geo:mgrs</name>
|
||||||
|
<desc>Datatype for publishing a MGRS location</desc>
|
||||||
|
<doc>Military Grid Reference System, 'http://en.wikipedia.org/wiki/Military_grid_reference_system'.</doc>
|
||||||
|
</datatype>
|
||||||
|
]]></code>
|
||||||
|
<example caption='Validation of a MGRS Location Field'><![CDATA[
|
||||||
|
<field type='text-single' var='mgrs_location'>
|
||||||
|
<xdv:validate datatype='geo:mgrs'/>
|
||||||
|
<regex>\\d{1,2}[A-Za-z]\\s*[A-Za-z]{2}\\s*\\d{1,5}\\s*\\d{1,5}</regex>
|
||||||
|
</xdv:validate>
|
||||||
|
<value>38SMB4484</value>
|
||||||
|
</field>]]></example>
|
||||||
|
|
||||||
|
</section2>
|
||||||
|
</section1>
|
||||||
|
<section1 topic='XML Schema' anchor='schema'>
|
||||||
|
<p>As this document only defines semantics for existing protocol, additional schemas are not required.</p>
|
||||||
|
</section1>
|
||||||
|
</xep>
|
||||||
|
Loading…
Reference in New Issue
Block a user