JEP-0145: Annotations

This JEP defines a protocol for making annotations about roster items and other entities.


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


JEP Information

Status: Proposed
Type: Historical
Number: 0145
Version: 0.2
Last Updated: 2005-07-15
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, JEP-0049
Supersedes: None
Superseded By: None
Short Name: rosternotes
Wiki Page: <http://wiki.jabber.org/index.php/Annotations (JEP-0145)>

Author Information

Stefan Strigler

Email: steve@zeank.in-berlin.de
JID: zeank@jwchat.org

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2006 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.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

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 (RFC 3920) and XMPP IM (RFC 3921) 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 protocol defined in this JEP 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.

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. The storage:rosternotes Namespace
3. Security Considerations
4. IANA Considerations
5. Jabber Registrar Considerations
5.1. Protocol Namespaces
6. XML Schema
Notes
Revision History


1. Introduction

Many modern IM clients offer functionality that enables users to make notes about items in their roster. This comes in handy if users don't have meaningful information in their vCard or if you need to remember additional things related to a roster item.

This specification defines a protocol for storing annotations about a given set of entities. Its primary goal is to enable users to store some personal piece of information with their roster items. Private XML Storage [1] provides with a convenient method for storing user data on the server using the 'jabber:iq:private' namespace; all we need to do is define a namespace and schema for storing this sort of information. For this the 'storage' element introduced in Bookmark Storage [2] is reused, and a new namespace of 'storage:rosternotes' is added.

2. The storage:rosternotes Namespace

Annotations are stored using server-side private XML storage (the 'jabber:iq:private' namespace). A storage element marked by the storage:rosternotes namespace contains a collection of one or more <note/> elements, each representing a note about a given entity. For any given JID there MUST NOT be more than one note.

The 'jid' attribute of the <note/> element SHOULD be used without a resource. Along with the annotation a client MAY choose to store creation time ('cdate') and modification time ('mdate') as attributes to the <note/> element containing the note; these attributes MUST conform to the DateTime profile specified in Jabber Date and Time Profiles [3] and the timezone SHOULD be UTC.

Example 1. Storing Annotations

    
<iq type='set' id='a1'>
  <query xmlns='jabber:iq:private'>
    <storage xmlns='storage:rosternotes'>
      <note jid='hamlet@shakespeare.lit'
            cdate='2004-09-24T15:23:21Z'
            mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
      <note jid='juliet@capulet.com'
            cdate='2004-09-27T17:23:14Z'
            mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
    </storage>
  </query>
</iq>

Note: All notes are stored as a "bundle" within the same <storage/> element.

Retrieving notes uses the protocol described in JEP-0049.

Example 2. Retrieving Annotations

    
<iq type='get' id='a2'>
  <query xmlns='jabber:iq:private'>
    <storage xmlns='storage:rosternotes'/>
  </query>
</iq>

Example 3. Server response

    
<iq type='result' id='a2'>
  <query xmlns='jabber:iq:private'>
    <storage xmlns='storage:rosternotes'>
      <note jid='hamlet@shakespeare.lit'
            cdate='2004-09-24T15:23:21Z'
            mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
      <note jid='juliet@capulet.com'
            cdate='2004-09-27T17:23:14Z'
            mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
    </storage>
  </query>
</iq>

For error conditions please refer to JEP-0049.

3. Security Considerations

Security considerations related to private XML storage are described in JEP-0049.

4. IANA Considerations

No interaction with the Internet Assigned Numbers Authority (IANA) [4] is required as a result of this JEP.

5. Jabber Registrar Considerations

5.1 Protocol Namespaces

The Jabber Registrar [5] shall include 'storage:rosternotes' in its registry of protocol namespaces.

6. XML Schema

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

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='storage:rosternotes'
    xmlns='storage:rosternotes'
    elementFormDefault='qualified'>

  <xs:element name='storage'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='note' minOccurs='0' maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name='note'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='jid' type='xs:string' use='required'/>
          <xs:attribute name='cdate' type='xs:dateTime' use='optional'/>
          <xs:attribute name='mdate' type='xs:dateTime' use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
  


Notes

1. JEP-0049: Private XML Storage <http://www.jabber.org/jeps/jep-0049.html>.

2. JEP-0048: Bookmark Storage <http://www.jabber.org/jeps/jep-0048.html>.

3. JEP-0082: Jabber Date and Time Profiles <http://www.jabber.org/jeps/jep-0082.html>.

4. 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/>.

5. 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.2 (2005-07-15)

JEP Editor revisions: changed type to Historical; changed namespace to storage:rosternotes; corrected schema; specified use of DateTime profile from JEP-0082; corrected some small textual errors. (psa)

Version 0.1 (2004-11-05)

Initial version. (st)


END