JEP-0112: User Physical Location

This JEP defines a protocol for communicating information about the current physical location of a Jabber entity.


NOTICE: This JEP is currently within Last Call or under consideration by the Jabber Council for advancement to the next stage in the JSF standards process. For further details, visit <http://www.jabber.org/council/queue.php>.


JEP Information

Status: Proposed
Type: Standards Track
Number: 0112
Version: 0.7
Last Updated: 2004-10-10
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, JEP-0060
Supersedes: None
Superseded By: None
Short Name: physloc

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2004 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.php>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <http://www.opencontent.org/openpub/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core and XMPP IM specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocols defined in this JEP have been developed outside the Internet Standards Process and are to be understood as extensions to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.


Table of Contents

1. Introduction
2. Protocol
3. Usage
4. Mapping to Other Formats
5. Security Considerations
6. IANA Considerations
7. Jabber Registrar Considerations
7.1. Protocol Namespaces
8. XML Schema
Notes
Revision History


1. Introduction

This JEP defines an extension mechanism for capturing "extended presence" information about a user's current physical location. The information structures defined herein are intended to provide a format for describing a location or address that may change fairly frequently (e.g., one's location on a campus or in a large building) in situations where the user or application does not possess, or does not wish to communicate, detailed latitude/longitude data of the type defined in User Geolocation [1].

2. Protocol

Information about the user's location is provided by the user and propagated on the network by the user's client. The information is structured by means of an <physloc/> element that is qualified by the 'http://jabber.org/protocol/physloc' namespace. The location information itself is provided as the XML character data of the following children of the <physloc/> element:

Table 1: Child Elements

Element Description Example
<country/> The nation where the user is located USA
<region/> An administrative region of the nation, such as a state or province New York
<locality/> A locality within the administrative region, such as a town or city New York City
<area/> A named area such as a campus or neighborhood Central Park
<street/> A thoroughfare within the locality, or a crossing of two thoroughfares 34th and Broadway
<building/> A specific building on a street or in an area The Empire State Building
<floor/> A particular floor in a building 102
<room/> A particular room in a building Observatory
<postalcode/> A code used for postal delivery 10027
<text/> A catch-all element that captures any other information about the user's location Northwest corner of the lobby

3. Usage

The <physloc/> information SHOULD be communicated by means of Publish-Subscribe [2]. Because physical location information is not pure presence information and can change independently of the user's availability, it SHOULD NOT be provided as an extension to <presence/>.

Example 1. User Publishes Address

<iq type='set'
    from='stpeter@jabber.org/laptop'
    to='pubsub.jabber.org'
    id='publish1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='generic/stpeter-loc'>
      <item id='current'>
        <physloc xmlns='http://jabber.org/protocol/physloc'>
          <country>Austria</country>
          <locality>Vienna</locality>
          <building>Vienna International Centre</building>
          <text>At IETF 57</text>
        </physloc>
      </item>
    </publish>
  </pubsub>
</iq>
  

The location information is then delivered to all subscribers:

Example 2. Activity is Delivered to All Subscribers

<message
    from='pubsub.jabber.org'
    to='jer@jabber.org/silver'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='generic/stpeter-physloc'>
      <item id='current'>
        <physloc xmlns='http://jabber.org/protocol/physloc'>
          <country>Austria</country>
          <locality>Vienna</locality>
          <building>Vienna International Centre</building>
          <text>At IETF 57</text>
        </physloc>
      </item>
    </items>
  </event>
</message>
.
.
.
  

As mentioned in JEP-0060, the stanza containing the event notification or payload MAY also include 'replyto' data (as specified by the Extended Stanza Addressing [3] protocol) to provide an explicit association between the published data and the user:

Example 3. Event notification with extended stanza addressing

<message
    from='pubsub.jabber.org'
    to='jer@jabber.org/silver'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='generic/stpeter-physloc'>
      <item id='current'>
        <physloc xmlns='http://jabber.org/protocol/physloc'>
          <country>Austria</country>
          <locality>Vienna</locality>
          <building>Vienna International Centre</building>
          <text>At IETF 57</text>
        </physloc>
      </item>
    </items>
  </event>
  <addresses xmlns='http://jabber.org/protocol/address'>
    <address type='replyto' jid='juliet@capulet.com'/>
  </addresses>
</message>
  

4. Mapping to Other Formats

There are many XML data formats for physical location or address information. It is beyond the scope of this JEP to provide a mapping from the extension defined herein to every such format. However, it would be valuable to provide a mapping from the Jabber/XMPP format to the formats used in other presence or extended presence protocols. The two main protocols of interest are:

  1. 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 [4].

  2. The SIP-based SIMPLE specifications; the IETF's GEOPRIV Working Group has defined an extension to the IETF's Presence Information Data Format (PIDF) [5] for location information, as specified in A Presence-based GEOPRIV Location Object Format [6] (also known as "PIDF-LO").

The following table also maps the format defined herein to the vCard XML format specified in vcard-temp [7].

Table 2: Mapping Jabber Physical Location to IMPS, PIDF-LO, and vCard

Jabber/XMPP Wireless Village / IMPS SIMPLE (PIDF-LO) vCard XML
<country/> <Country/> <country/> <CTRY/> [8]
<region/> -- <A1/> and/or <A2/> <REGION/>
<locality/> <City/> <A3/> <LOCALITY/>
<area/> <NamedArea/> <A4/> and/or <A5/> --
<street/> <Street/> [9] <A6/> [10] <STREET/>
<building/> <Building/> <LMK/> --
<floor/> -- <FLR/> --
<room/> -- -- --
<postalcode/> -- <PC/> <PCODE/>
<text/> <FreeTextLocation/> <LOC/> <EXTADR/>
-- <Accuracy/> [11] -- --
-- -- <NAM/> [12] --

5. Security Considerations

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. A user SHOULD take care in approving subscribers and in characterizing his or her current physical location.

6. IANA Considerations

This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [13].

7. Jabber Registrar Considerations

7.1 Protocol Namespaces

Upon advancement of this proposal to a status of Draft, the Jabber Registrar [14] shall add the 'http://jabber.org/protocol/physloc' namespace to its registry of protocol namespaces.

8. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/protocol/physloc'
    xmlns='http://jabber.org/protocol/physloc'
    elementFormDefault='qualified'>

  <xs:element name='physloc'>
    <xs:complexType>
      <xs:sequence minOccurs='0'>
        <xs:element name='country' minOccurs='0' type='xs:string'/>
        <xs:element name='region' minOccurs='0' type='xs:string'/>
        <xs:element name='locality' minOccurs='0' type='xs:string'/>
        <xs:element name='area' minOccurs='0' type='xs:string'/>
        <xs:element name='street' minOccurs='0' type='xs:string'/>
        <xs:element name='building' minOccurs='0' type='xs:string'/>
        <xs:element name='floor' minOccurs='0' type='xs:string'/>
        <xs:element name='room' minOccurs='0' type='xs:string'/>
        <xs:element name='text' minOccurs='0' type='xs:string'/>
        <xs:element name='url' minOccurs='0' type='xs:string'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
  


Notes

1. JEP-0080: User Geolocation <http://www.jabber.org/jeps/jep-0080.html>.

2. JEP-0060: Publish-Subscribe <http://www.jabber.org/jeps/jep-0060.html>.

3. JEP-0033: Extended Stanza Addressing <http://www.jabber.org/jeps/jep-0033.html>.

4. The Wireless Village Initiative: Presence Attributes v1.1 (WV-029); for further information, visit <http://www.openmobilealliance.org/tech/affiliates/wv/wvindex.html>.

5. RFC 3863: Presence Information Data Format (PIDF) <http://www.ietf.org/rfc/rfc3863.txt>.

6. A Presence-based GEOPRIV Location Object Format <http://www.ietf.org/internet-drafts/draft-ietf-geopriv-pidf-lo-03.txt>.

7. JEP-0054: vcard-temp <http://www.jabber.org/jeps/jep-0054.html>.

8. As noted in JEP-0054, the XML vCard format defined in draft-dawson-vcard-xml-dtd-01 specified a <COUNTRY/> element rather than a <CTRY/> element; refer to JEP-0054 for details.

9. The IMPS specification also enables one to define an intersection (e.g., "Broadway and 34th Street") as the combination of a <Crossing1/> element (e.g., "Broadway") and a <Crossing2/> element (e.g., "34th Street"). To map from IMPS to Jabber, an application SHOULD map such a combination to one Jabber/XMPP <street/> element.

10. The PIDF-LO format provides information elements for much more granular control over a traditional street address; in PIDF-LO the <A6/> 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 Jabber, an application SHOULD construct the complete street address from the PIDF-LO elements (<A6/>, <PRD/>, <POD/>, <STS/>, <HNO/>, and <HNS/>) and map the result to one Jabber/XMPP <street/> element.

11. This element provides accuracy in meters. The geolocation protocol defined in JEP-0080 specifies such an element for Jabber/XMPP, which SHOULD be used when mapping from IMPS to Jabber.

12. This element provides a name for the location, e.g., a certain store in a building. This SHOULD be mapped to the Jabber/XMPP <text/> element.

13. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

14. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.7 (2004-10-10)

Added <postalcode/> element; removed <url/> element (unnecessary given the existence of jabber:x:oob); defined mapping to vCard. (psa)

Version 0.6 (2004-10-05)

Defined mappings to Wireless Village and SIMPLE. (psa)

Version 0.5 (2004-05-11)

Changed root element, namespace, and shortname to physloc to prevent conflict with JEP-0033. (psa)

Version 0.4 (2004-04-25)

Corrected several errors; added reference to JEP-0033. (psa)

Version 0.3 (2004-02-19)

Revived JEP upon modifications to JEP-0080; changed root element, namespace, and shortname to 'address'. (psa)

Version 0.2 (2003-08-21)

Removed 'current' from title; changed shortname to 'location'; changed 'freetext' to 'text'; made several other small fixes. (psa)

Version 0.1 (2003-08-20)

Initial version. (psa)


END