XEP-0112: User Physical Location

Abstract:This document defines a protocol for communicating information about the current physical location of a Jabber entity. NOTE WELL: The protocol defined herein has been folded into XEP-0080.
Author:Peter Saint-Andre
Copyright:© 1999 - 2014 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Obsolete
Type:Standards Track
Version:1.0
Last Updated:2004-10-12

WARNING: This document has been obsoleted by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (if any).


Table of Contents


1. Introduction
2. Protocol
3. Usage
4. Mapping to Other Formats
5. Internationalization Considerations
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
    8.1. Protocol Namespaces
9. XML Schema

Appendices
    A: Document Information
    B: Author Information
    C: Legal Notices
    D: Relation to XMPP
    E: Discussion Venue
    F: Requirements Conformance
    G: Notes
    H: Revision History


1. Introduction

NOTE WELL: The protocol defined herein has been folded into User Geolocation (XEP-0080) [1].

This document 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 XEP-0080.

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

ElementDescriptionExample
<country/>The nation where the user is locatedUSA
<region/>An administrative region of the nation, such as a state or provinceNew York
<locality/>A locality within the administrative region, such as a town or cityNew York City
<area/>A named area such as a campus or neighborhoodCentral Park
<street/>A thoroughfare within the locality, or a crossing of two thoroughfares34th and Broadway
<building/>A specific building on a street or in an areaThe Empire State Building
<floor/>A particular floor in a building102
<room/>A particular room in a buildingObservatory
<postalcode/>A code used for postal delivery10027
<text/>A catch-all element that captures any other information about the user's locationNorthwest corner of the lobby

3. Usage

The <physloc/> information SHOULD be communicated by means of Publish-Subscribe (XEP-0060) [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'
                 xml:lang='en'>
          <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. Address 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'
                 xml:lang='en'>
          <country>Austria</country>
          <locality>Vienna</locality>
          <building>Vienna International Centre</building>
          <text>At IETF 57</text>
        </physloc>
      </item>
    </items>
  </event>
</message>
.
.
.
  

As mentioned in XEP-0060, the stanza containing the event notification or payload MAY also include 'replyto' data (as specified by the Extended Stanza Addressing (XEP-0033) [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'
                 xml:lang='en'>
          <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='stpeter@jabber.org'/>
  </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 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 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; in particular, 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 RFC 4119 [6] (also known as "PIDF-LO").

The following table also maps the format defined herein to the vCard XML format specified in vcard-temp (XEP-0054) [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. Internationalization Considerations

Because the character data contained in most <physloc/> child elements is intended to be readable by humans, the <physloc/> element SHOULD possess an 'xml:lang' attribute specifying the natural language of such character data.

6. 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.

7. IANA Considerations

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

8. XMPP Registrar Considerations

8.1 Protocol Namespaces

The XMPP Registrar [14] includes 'http://jabber.org/protocol/physloc' in its registry of protocol namespaces, but the namespace is deprecated.

9. 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>
        <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='postalcode' minOccurs='0' type='xs:string'/>
        <xs:element name='text' minOccurs='0' type='xs:string'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
  

Appendices


Appendix A: Document Information

Series: XEP
Number: 0112
Publisher: XMPP Standards Foundation
Status: Obsolete
Type: Standards Track
Version: 1.0
Last Updated: 2004-10-12
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0060
Supersedes: None
Superseded By: XEP-0080
Short Name: physloc
Source Control: HTML
This document in other formats: XML  PDF


Appendix B: Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JabberID: stpeter@jabber.org
URI: https://stpeter.im/


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2014 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <http://xmpp.org/about-xmpp/xsf/xsf-ipr-policy/> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata can be sent to <editor@xmpp.org>.


Appendix F: Requirements Conformance

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


Appendix G: Notes

1. XEP-0080: User Geolocation <http://xmpp.org/extensions/xep-0080.html>.

2. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.

3. XEP-0033: Extended Stanza Addressing <http://xmpp.org/extensions/xep-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://tools.ietf.org/html/rfc3863>.

6. RFC 4119: A Presence-based GEOPRIV Location Object Format <http://tools.ietf.org/html/rfc4119>.

7. XEP-0054: vcard-temp <http://xmpp.org/extensions/xep-0054.html>.

8. As noted in XEP-0054, the XML vCard format defined in draft-dawson-vcard-xml-dtd-01 specified a <COUNTRY/> element rather than a <CTRY/> element; refer to XEP-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 XEP-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 XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 1.0 (2004-10-12)

Per a vote of the Jabber Council, advanced status to Draft. (psa)

Version 0.8 (2004-10-12)

Added internationalization considerations. (psa)

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 XEP-0033. (psa)

Version 0.4 (2004-04-25)

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

Version 0.3 (2004-02-19)

Revived document upon modifications to XEP-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