JEP-0107: User Mood

This JEP defines a protocol for communicating information about user moods.


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: 0107
Version: 0.6
Last Updated: 2004-09-15
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, JEP-0060
Supersedes: None
Superseded By: None
Short Name: mood

Author Information

Peter Saint-Andre

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

Ralph Meijer

Email: ralphm@ik.nu
JID: ralphm@ik.nu

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
2.1. Pubsub
2.2. Message
3. Mood Values
4. Mapping to Wireless Village Moods
5. Internationalization Considerations
6. Security Considerations
7. IANA Considerations
8. Jabber Registrar Considerations
8.1. Protocol Namespaces
9. XML Schema
Notes
Revision History


1. Introduction

This JEP defines an extension mechanism for capturing "extended presence" data about user moods.

2. Protocol

Information about user moods is provided by the user and propagated on the network by the user's client. The information is structured via a <mood/> element that is qualified by the 'http://jabber.org/protocol/mood' namespace. The mood itself is provided as the XML character data of the <value/> child of the <mood/> element, which is REQUIRED. The user MAY also specify a natural-language description of, or reason for, the mood in the <text/> child of the <mood/> element, which is OPTIONAL.

The <mood/> element SHOULD be communicated by means of Publish-Subscribe [1] but MAY be provided in a message as well. Because mood 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/>.

2.1 Pubsub

If the user wishes to publish his mood to all of those who are subscribed to his mood information, the user SHOULD use publish-subscribe.

Example 1. User Publishes Mood

<iq type='set' 
    from='juliet@capulet.com/balcony' 
    to='pubsub.shakespeare.lit' 
    id='publish1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='generic/juliet-mood'>
      <item id='current'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <value>annoyed</value>
          <text>curse my nurse!</text>
        </mood>
      </item>
    </publish>
  </pubsub>
</iq>
    

The mood is then delivered to all subscribers:

Example 2. Mood is Delivered to All Subscribers

<message 
    from='pubsub.shakespeare.lit' 
    to='romeo@montague.net/orchard'>
  <x xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='generic/juliet-mood'>
      <item id='current'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <value>annoyed</value>
          <text>curse my nurse!</text>
        </mood>
      </item>
    </items>
  </x>
</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 [2] protocol) to provide an explicit association between the published data and the user:

Example 3. Event notification with extended stanza addressing

<message 
    from='pubsub.shakespeare.lit' 
    to='romeo@montague.net/orchard'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='generic/juliet-mood'>
      <item id='current'>
        <mood xmlns='http://jabber.org/protocol/mood'>
          <value>annoyed</value>
          <text>curse my nurse!</text>
        </mood>
      </item>
    </items>
  </event>
  <addresses xmlns='http://jabber.org/protocol/address'>
    <address type='replyto' jid='juliet@capulet.com'/>
  </addresses>
</message>
    

2.2 Message

A user MAY also provide a mood extension in a specific message, in order to lend a defined emotional tone to the message.

Example 4. User Provides Mood in Message

<message from='romeo@montague.net/orchard'
         to='juliet@capulet.com/balcony'
         type='chat'>
  <body>A thousand times good night!</body>
  <mood xmlns='http://jabber.org/protocol/mood'/>
    <value>sad</value>
  </mood>
</message>
    

The <mood/> element could even contain a URL reference structured according to the Out-of-Band Data [3] protocol:

Example 5. User Provides Mood and URL in Message

<message from='ralphm@ik.nu/work'
         to='stpeter@jabber.org/home'
         type='chat'>
  <body>Cool!</body>
  <mood xmlns='http://jabber.org/protocol/mood'>
    <value>happy</value>
    <text>Yay, the mood JEP has been published!</text>
    <x xmlns='jabber:x:oob'>
      <url>http://www.jabber.org/jeps/jep-0107.html</url>
    </x>
  </mood>
</message>
    

3. Mood Values

There exist various theories of human affect, mood, and emotion, including those promulgated by Frijda [4], Ortony et al. [5], and Wierzbicka [6]. The taxonomy provided here mostly follows the Affective Knowledge Representation that has been defined by Lisetti [7] in an effort to harmonize the prevailing theories in this area. Furthermore, the taxonomy provided here includes a number of physical states in addition to moods, and also takes into account the specific context of instant messaging, including work done by other standards development organizations (e.g., the Wireless Village specifications contributed to the Open Mobile Alliance (OMA) [8]) and instant messaging service providers (e.g., ICQ).

The mood values defined in this taxonomy are as follows:

4. Mapping to Wireless Village Moods

The Wireless Village (now "IMPS") specifications for mobile instant messaging define a number of presence attributes, encapsulated in the "StatusMood" information element [9]. The following values are defined for StatusMood in Wireless Village, all of which map one-to-one from Wireless Village to the same values (albeit lowercase) in Jabber:

The full range of moods defined herein is richer than that defined in Wireless Village; no mapping is provided by this specification for mood values that are not present in Wireless Village, and any such mapping is the responsibility of a gateway between the two systems.

5. Internationalization Considerations

The XML character data values of the <value/> elements is not intended to be presented to a human user and thus there is no special reason to include an 'xml:lang' attribute unless the sender includes a <text/> element as well (as explained in RFC 2277 [10], "internationalization is for humans"). It is the responsibility of the receiving application to provide localized text strings associated with the XML character data values defined herein, or some other appropriate presentation (e.g., graphical images that represent the mood).

6. Security Considerations

Because user moods may be published to a large number of pubsub subscribers, users should take care in approving subscribers and in characterizing their current moods.

7. IANA Considerations

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

8. Jabber Registrar Considerations

8.1 Protocol Namespaces

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

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/mood'
    xmlns='http://jabber.org/protocol/mood'
    elementFormDefault='qualified'>

  <xs:element name='mood'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='text' minOccurs='0' type='xs:string'/>
        <xs:element ref='value'>
          <xs:simpleType>
            <xs:restriction base='xs:NCName'>
              <xs:enumeration value='afraid'/>
              <xs:enumeration value='amazed'/>
              <xs:enumeration value='angry'/>
              <xs:enumeration value='annoyed'/>
              <xs:enumeration value='anxious'/>
              <xs:enumeration value='ashamed'/>
              <xs:enumeration value='bored'/>
              <xs:enumeration value='brave'/>
              <xs:enumeration value='calm'/>
              <xs:enumeration value='cold'/>
              <xs:enumeration value='confused'/>
              <xs:enumeration value='contented'/>
              <xs:enumeration value='cranky'/>
              <xs:enumeration value='curious'/>
              <xs:enumeration value='depressed'/>
              <xs:enumeration value='disappointed'/>
              <xs:enumeration value='disgusted'/>
              <xs:enumeration value='distracted'/>
              <xs:enumeration value='embarrassed'/>
              <xs:enumeration value='excited'/>
              <xs:enumeration value='flirtatious'/>
              <xs:enumeration value='frustrated'/>
              <xs:enumeration value='grumpy'/>
              <xs:enumeration value='guilty'/>
              <xs:enumeration value='happy'/>
              <xs:enumeration value='hot'/>
              <xs:enumeration value='humbled'/>
              <xs:enumeration value='humiliated'/>
              <xs:enumeration value='hungry'/>
              <xs:enumeration value='hurt'/>
              <xs:enumeration value='impressed'/>
              <xs:enumeration value='in_awe'/>
              <xs:enumeration value='in_love'/>
              <xs:enumeration value='indignant'/>
              <xs:enumeration value='interested'/>
              <xs:enumeration value='invincible'/>
              <xs:enumeration value='jealous'/>
              <xs:enumeration value='lonely'/>
              <xs:enumeration value='mean'/>
              <xs:enumeration value='moody'/>
              <xs:enumeration value='nervous'/>
              <xs:enumeration value='neutral'/>
              <xs:enumeration value='offended'/>
              <xs:enumeration value='playful'/>
              <xs:enumeration value='proud'/>
              <xs:enumeration value='relieved'/>
              <xs:enumeration value='remorseful'/>
              <xs:enumeration value='restless'/>
              <xs:enumeration value='sad'/>
              <xs:enumeration value='sarcastic'/>
              <xs:enumeration value='serious'/>
              <xs:enumeration value='shocked'/>
              <xs:enumeration value='shy'/>
              <xs:enumeration value='sick'/>
              <xs:enumeration value='sleepy'/>
              <xs:enumeration value='stressed'/>
              <xs:enumeration value='surprised'/>
              <xs:enumeration value='thirsty'/>
              <xs:enumeration value='worried'/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
  


Notes

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

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

3. JEP-0066: Out of Band Data <http://www.jabber.org/jeps/jep-0066.html>.

4. Frijda, N. 1986. The Emotions. New York: Cambridge University Press.

5. Ortony, A., Clore, G., and Collins, A. 1988. The Cognitive Structure of Emotions. Hillsdale, NJ: Erlbaum.

6. Wierzbicka, A. 1992. Defining Emotion Concepts. Cognitive Science 16: 539-581.

7. Lisetti, C. 2002. Personality, Affect, and Emotion Taxonomy for Socially Intelligent Agents. In Proceedings of FLAIRS 2002. Menlo Park, CA: AAAI Press.

8. The Open Mobile Alliance is the focal point for the development of mobile service enabler specifications, which support the creation of interoperable end-to-end mobile services. For further information, see <http://www.openmobilealliance.org/>.

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

10. RFC 2277: IETF Policy on Character Sets and Languages <http://www.ietf.org/rfc/rfc2277.txt>.

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

12. 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.6 (2004-09-15)

Added internationalization considerations. (psa)

Version 0.5 (2004-04-25)

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

Version 0.4 (2004-02-19)

Minor fixes to text and schema. (psa)

Version 0.3 (2003-08-01)

Added more moods. (psa)

Version 0.2 (2003-07-23)

Expanded the information format; changed primary container to use pubsub. (psa)

Version 0.1 (2003-07-22)

Initial version. (psa)


END