<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>User Physical Location</title>
  <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.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<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.</permissions>
<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. ##</warranty>
<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.</liability>
<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 &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0112</number>
  <status>Obsolete</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XEP-0060</spec>
  </dependencies>
  <supersedes/>
  <supersededby>
    <spec>XEP-0080</spec>
  </supersededby>
  <shortname>physloc</shortname>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  <revision>
    <version>1.0</version>
    <date>2004-10-12</date>
    <initials>psa</initials>
    <remark>Per a vote of the Jabber Council, advanced status to Draft.</remark>
  </revision>
  <revision>
    <version>0.8</version>
    <date>2004-10-12</date>
    <initials>psa</initials>
    <remark>Added internationalization considerations.</remark>
  </revision>
  <revision>
    <version>0.7</version>
    <date>2004-10-10</date>
    <initials>psa</initials>
    <remark>Added &lt;postalcode/&gt; element; removed &lt;url/&gt; element (unnecessary given the existence of jabber:x:oob); defined mapping to vCard.</remark>
  </revision>
  <revision>
    <version>0.6</version>
    <date>2004-10-05</date>
    <initials>psa</initials>
    <remark>Defined mappings to Wireless Village and SIMPLE.</remark>
  </revision>
  <revision>
    <version>0.5</version>
    <date>2004-05-11</date>
    <initials>psa</initials>
    <remark>Changed root element, namespace, and shortname to physloc to prevent conflict with XEP-0033.</remark>
  </revision>
  <revision>
    <version>0.4</version>
    <date>2004-04-25</date>
    <initials>psa</initials>
    <remark>Corrected several errors; added reference to XEP-0033.</remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2004-02-19</date>
    <initials>psa</initials>
    <remark>Revived document upon modifications to XEP-0080; changed root element, namespace, and shortname to 'address'.</remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2003-08-21</date>
    <initials>psa</initials>
    <remark>Removed 'current' from title; changed shortname to 'location'; changed 'freetext' to 'text'; made several other small fixes.</remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2003-08-20</date>
    <initials>psa</initials>
    <remark>Initial version.</remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p><em>NOTE WELL: The protocol defined herein has been folded into <span class="ref"><link url="https://xmpp.org/extensions/xep-0080.html">User Geolocation (XEP-0080)</link></span> <note>XEP-0080: User Geolocation &lt;<link url="https://xmpp.org/extensions/xep-0080.html">https://xmpp.org/extensions/xep-0080.html</link>&gt;.</note>.</em></p>
  <p>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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0080.html">User Geolocation (XEP-0080)</link></span> <note>XEP-0080: User Geolocation &lt;<link url="https://xmpp.org/extensions/xep-0080.html">https://xmpp.org/extensions/xep-0080.html</link>&gt;.</note>.</p>
</section1>
<section1 topic="Protocol" anchor="protocol">
  <p>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 &lt;physloc/&gt; 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 &lt;physloc/&gt; element:</p>
  <table caption="Child Elements">
    <tr><th>Element</th><th>Description</th><th>Example</th></tr>
    <tr><td>&lt;country/&gt;</td><td>The nation where the user is located</td><td>USA</td></tr>
    <tr><td>&lt;region/&gt;</td><td>An administrative region of the nation, such as a state or province</td><td>New York</td></tr>
    <tr><td>&lt;locality/&gt;</td><td>A locality within the administrative region, such as a town or city</td><td>New York City</td></tr>
    <tr><td>&lt;area/&gt;</td><td>A named area such as a campus or neighborhood</td><td>Central Park</td></tr>
    <tr><td>&lt;street/&gt;</td><td>A thoroughfare within the locality, or a crossing of two thoroughfares</td><td>34th and Broadway</td></tr>
    <tr><td>&lt;building/&gt;</td><td>A specific building on a street or in an area</td><td>The Empire State Building</td></tr>
    <tr><td>&lt;floor/&gt;</td><td>A particular floor in a building</td><td>102</td></tr>
    <tr><td>&lt;room/&gt;</td><td>A particular room in a building</td><td>Observatory</td></tr>
    <tr><td>&lt;postalcode/&gt;</td><td>A code used for postal delivery</td><td>10027</td></tr>
    <tr><td>&lt;text/&gt;</td><td>A catch-all element that captures any other information about the user's location</td><td>Northwest corner of the lobby</td></tr>
  </table>
</section1>
<section1 topic="Usage" anchor="usage">
  <p>The &lt;physloc/&gt; information SHOULD be communicated by means of <span class="ref"><link url="https://xmpp.org/extensions/xep-0060.html">Publish-Subscribe (XEP-0060)</link></span> <note>XEP-0060: Publish-Subscribe &lt;<link url="https://xmpp.org/extensions/xep-0060.html">https://xmpp.org/extensions/xep-0060.html</link>&gt;.</note>. 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 &lt;presence/&gt;.</p>
  <example caption="User Publishes Address"><![CDATA[
<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>
]]></example>
  <p>The location information is then delivered to all subscribers:</p>
  <example caption="Address is Delivered to All Subscribers"><![CDATA[
<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>
.
.
.
]]></example>
  <p>As mentioned in XEP-0060, the stanza containing the event notification or payload MAY also include 'replyto' data (as specified by the <span class="ref"><link url="https://xmpp.org/extensions/xep-0033.html">Extended Stanza Addressing (XEP-0033)</link></span> <note>XEP-0033: Extended Stanza Addressing &lt;<link url="https://xmpp.org/extensions/xep-0033.html">https://xmpp.org/extensions/xep-0033.html</link>&gt;.</note> protocol) to provide an explicit association between the published data and the user:</p>
  <example caption="Event notification with extended stanza addressing"><![CDATA[
<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>
]]></example>
</section1>
<section1 topic="Mapping to Other Formats" anchor="mapping">
  <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 Jabber/XMPP format to the formats used in other presence or extended presence protocols. The two main protocols of interest are:</p>
  <ol>
    <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="http://www.openmobilealliance.org/tech/affiliates/wv/wvindex.html">http://www.openmobilealliance.org/tech/affiliates/wv/wvindex.html</link>&gt;.</note>.</p></li>
    <li><p>The SIP-based SIMPLE specifications; in particular, the IETF's GEOPRIV Working Group has defined an extension to the IETF's <span class="ref"><link url="http://tools.ietf.org/html/rfc3863">Presence Information Data Format (PIDF) </link></span> <note>RFC 3863: Presence Information Data Format (PIDF) &lt;<link url="http://tools.ietf.org/html/rfc3863">http://tools.ietf.org/html/rfc3863</link>&gt;.</note> for location information, as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc4119">RFC 4119</link></span> <note>RFC 4119: A Presence-based GEOPRIV Location Object Format &lt;<link url="http://tools.ietf.org/html/rfc4119">http://tools.ietf.org/html/rfc4119</link>&gt;.</note> (also known as "PIDF-LO").</p></li>
  </ol>
  <p>The following table also maps the format defined herein to the vCard XML format specified in <span class="ref"><link url="https://xmpp.org/extensions/xep-0054.html">vcard-temp (XEP-0054)</link></span> <note>XEP-0054: vcard-temp &lt;<link url="https://xmpp.org/extensions/xep-0054.html">https://xmpp.org/extensions/xep-0054.html</link>&gt;.</note>.</p>
  <table caption="Mapping Jabber Physical Location to IMPS, PIDF-LO, and vCard">
    <tr>
      <th>Jabber/XMPP</th>
      <th>Wireless Village / IMPS</th>
      <th>SIMPLE (PIDF-LO)</th>
      <th>vCard XML</th>
    </tr>
    <tr>
      <td align="center">&lt;country/&gt;</td>
      <td align="center">&lt;Country/&gt;</td>
      <td align="center">&lt;country/&gt;</td>
      <td align="center">&lt;CTRY/&gt;
        <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>
      </td>
    </tr>
    <tr>
      <td align="center">&lt;region/&gt;</td>
      <td align="center">--</td>
      <td align="center">&lt;A1/&gt; and/or &lt;A2/&gt;</td>
      <td align="center">&lt;REGION/&gt;</td>
    </tr>
    <tr>
      <td align="center">&lt;locality/&gt;</td>
      <td align="center">&lt;City/&gt;</td>
      <td align="center">&lt;A3/&gt;</td>
      <td align="center">&lt;LOCALITY/&gt;</td>
    </tr>
    <tr>
      <td align="center">&lt;area/&gt;</td>
      <td align="center">&lt;NamedArea/&gt;</td>
      <td align="center">&lt;A4/&gt; and/or &lt;A5/&gt;</td>
      <td align="center">--</td>
    </tr>
    <tr>
      <td align="center">&lt;street/&gt;</td>
      <td align="center">&lt;Street/&gt;
        <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 Jabber, an application SHOULD map such a combination to one Jabber/XMPP &lt;street/&gt; element.</note>
      </td>
      <td align="center">&lt;A6/&gt;
        <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 Jabber, 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 Jabber/XMPP &lt;street/&gt; element.</note>
      </td>
      <td align="center">&lt;STREET/&gt;</td>
    </tr>
    <tr>
      <td align="center">&lt;building/&gt;</td>
      <td align="center">&lt;Building/&gt;</td>
      <td align="center">&lt;LMK/&gt;</td>
      <td align="center">--</td>
    </tr>
    <tr>
      <td align="center">&lt;floor/&gt;</td>
      <td align="center">--</td>
      <td align="center">&lt;FLR/&gt;</td>
      <td align="center">--</td>
    </tr>
    <tr>
      <td align="center">&lt;room/&gt;</td>
      <td align="center">--</td>
      <td align="center">--</td>
      <td align="center">--</td>
    </tr>
    <tr>
      <td align="center">&lt;postalcode/&gt;</td>
      <td align="center">--</td>
      <td align="center">&lt;PC/&gt;</td>
      <td align="center">&lt;PCODE/&gt;</td>
    </tr>
    <tr>
      <td align="center">&lt;text/&gt;</td>
      <td align="center">&lt;FreeTextLocation/&gt;</td>
      <td align="center">&lt;LOC/&gt;</td>
      <td align="center">&lt;EXTADR/&gt;</td>
    </tr>
    <tr>
      <td align="center">--</td>
      <td align="center">&lt;Accuracy/&gt;
        <note>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.</note>
      </td>
      <td align="center">--</td>
      <td align="center">--</td>
    </tr>
    <tr>
      <td align="center">--</td>
      <td align="center">--</td>
      <td align="center">&lt;NAM/&gt;
        <note>This element provides a name for the location, e.g., a certain store in a building. This SHOULD be mapped to the Jabber/XMPP &lt;text/&gt; element.</note>
      </td>
      <td align="center">--</td>
    </tr>
  </table>
</section1>
<section1 topic="Internationalization Considerations" anchor="i18n">
  <p>Because the character data contained in most &lt;physloc/&gt; child elements is intended to be readable by humans, the &lt;physloc/&gt; element SHOULD possess an 'xml:lang' attribute specifying the natural language of such character data.</p>
</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. A user SHOULD take care in approving subscribers and in characterizing his or her current physical location.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>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 &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <section2 topic="Protocol Namespaces" anchor="registrar-ns">
    <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>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 &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> includes 'http://jabber.org/protocol/physloc' in its registry of protocol namespaces, but the namespace is deprecated.</p>
  </section2>
</section1>
<section1 topic="XML Schema" anchor="schema">
  <code><![CDATA[
<?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>
]]></code>
</section1>
</xep>
