1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-10 03:15:00 -05:00
xeps/xep-0107.xml

372 lines
16 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>User Mood</title>
<abstract>This document defines an XMPP protocol extension for communicating information about user moods.</abstract>
&LEGALNOTICE;
<number>0107</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0060</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>mood</shortname>
<schemaloc>
<url>http://www.xmpp.org/schemas/mood.xsd</url>
</schemaloc>
&stpeter;
&ralphm;
<revision>
<version>1.0</version>
<date>2004-10-20</date>
<initials>psa/rm</initials>
<remark>Per a vote of the Jabber Council, advanced status to Draft; per Council discussion, also added two additional moods and adjusted structure to use elements rather than XML character data.</remark>
</revision>
<revision>
<version>0.6</version>
<date>2004-09-15</date>
<initials>psa</initials>
<remark>Added internationalization considerations.</remark>
</revision>
<revision>
<version>0.5</version>
<date>2004-04-25</date>
<initials>psa</initials>
<remark>Corrected several errors; added reference to XEP-0033.</remark>
</revision>
<revision>
<version>0.4</version>
<date>2004-02-19</date>
<initials>psa</initials>
<remark>Minor fixes to text and schema.</remark>
</revision>
<revision>
<version>0.3</version>
<date>2003-08-01</date>
<initials>psa</initials>
<remark>Added more moods.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-07-23</date>
<initials>psa</initials>
<remark>Expanded the information format; changed primary container to use pubsub.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-07-22</date>
<initials>psa</initials>
<remark>Initial version.</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>This document defines an extension mechanism for capturing "extended presence" data about user moods.</p>
</section1>
<section1 topic='Protocol' anchor='proto'>
<section2 topic='Data Format' anchor='proto-format'>
<p>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 &lt;mood/&gt; element that is qualified by the 'http://jabber.org/protocol/mood' namespace. The mood itself is provided as the element name of a defined child element of the &lt;mood/&gt; element (e.g., &lt;happy/&gt;); one such child element is REQUIRED. The user MAY also specify a natural-language description of, or reason for, the mood in the &lt;text/&gt; child of the &lt;mood/&gt; element, which is OPTIONAL. Here is an example:</p>
<code><![CDATA[
<mood xmlns='http://jabber.org/protocol/mood'>
<happy/>
<text>Yay, the mood document has been approved!</text>
</mood>
]]></code>
<p>In addition, an application MAY provide a more specific mood value as a properly-namespaced child of the defined element, which extension MUST be ignored if the receiving application does not understand the extended namespace. Here is an example:</p>
<code><![CDATA[
<mood xmlns='http://jabber.org/protocol/mood'>
<happy>
<ecstatic xmlns='http://ik.nu/ralphm'/>
</happy>
<text>Yay, the mood document has been approved!</text>
</mood>
]]></code>
</section2>
<section2 topic='Pubsub Transport' anchor='proto-pubsub'>
<p>The &lt;mood/&gt; element SHOULD be communicated by means of &xep0060; or the subset of publish-subscribe specified in &xep0163;, 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;.</p>
<p>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 (the following examples show use of the publish-subscribe subset specified in <cite>XEP-0163</cite>).</p>
<example caption='User Publishes Mood'><![CDATA[
<iq type='set'
from='juliet@capulet.com/balcony'
to='pubsub.shakespeare.lit'
id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='http://jabber.org/protocol/mood'>
<item id='a92lvfmlzsd923k'>
<mood xmlns='http://jabber.org/protocol/mood'>
<annoyed/>
<text>curse my nurse!</text>
</mood>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<p>The mood is then delivered to all subscribers:</p>
<example caption='Mood is Delivered to All Subscribers'><![CDATA[
<message
from='pubsub.shakespeare.lit'
to='romeo@montague.net/orchard'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/mood'>
<item id='a92lvfmlzsd923k'>
<mood xmlns='http://jabber.org/protocol/mood'>
<annoyed/>
<text>curse my nurse!</text>
</mood>
</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 &xep0033; 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.shakespeare.lit'
to='romeo@montague.net/orchard'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/mood'>
<item id='a92lvfmlzsd923k'>
<mood xmlns='http://jabber.org/protocol/mood'>
<annoyed/>
<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>
]]></example>
</section2>
<section2 topic='Message Transport' anchor='proto-message'>
<p>A user MAY also provide a mood extension in a specific message, in order to lend a defined emotional tone to the message.</p>
<example caption='User Provides Mood in Message'><![CDATA[
<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'/>
<sad/>
</mood>
</message>
]]></example>
<p>The &lt;mood/&gt; element could even contain a URL reference structured according to the &xep0066; protocol:</p>
<example caption='User Provides Mood and URL in Message'><![CDATA[
<message from='ralphm@ik.nu/work'
to='stpeter@jabber.org/home'
type='chat'>
<body>Cool!</body>
<mood xmlns='http://jabber.org/protocol/mood'>
<happy/>
<text>Yay, the mood document has been published!</text>
<x xmlns='jabber:x:oob'>
<url>http://www.xmpp.org/extensions/xep-0107.html</url>
</x>
</mood>
</message>
]]></example>
</section2>
</section1>
<section1 topic='Mood Values' anchor='moods'>
<p>There exist various theories of human affect, mood, and emotion, including those promulgated by Frijda <note>Frijda, N. 1986. <cite>The Emotions</cite>. New York: Cambridge University Press.</note>, Ortony et al. <note>Ortony, A., Clore, G., and Collins, A. 1988. <cite>The Cognitive Structure of Emotions</cite>. Hillsdale, NJ: Erlbaum.</note>, and Wierzbicka <note>Wierzbicka, A. 1992. Defining Emotion Concepts. <cite>Cognitive Science</cite> 16: 539-581.</note>. The taxonomy provided here mostly follows the Affective Knowledge Representation that has been defined by Lisetti <note>Lisetti, C. 2002. Personality, Affect, and Emotion Taxonomy for Socially Intelligent Agents. In <cite>Proceedings of FLAIRS 2002</cite>. Menlo Park, CA: AAAI Press.</note> 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 &OMA;) and instant messaging service providers (e.g., ICQ).</p>
<p>The mood values defined in this taxonomy are as follows:</p>
<ul>
<li>afraid</li>
<li>amazed</li>
<li>angry</li>
<li>annoyed</li>
<li>anxious</li>
<li>aroused</li>
<li>ashamed</li>
<li>bored</li>
<li>brave</li>
<li>calm</li>
<li>cold</li>
<li>confused</li>
<li>contented</li>
<li>cranky</li>
<li>curious</li>
<li>depressed</li>
<li>disappointed</li>
<li>disgusted</li>
<li>distracted</li>
<li>embarrassed</li>
<li>excited</li>
<li>flirtatious</li>
<li>frustrated</li>
<li>grumpy</li>
<li>guilty</li>
<li>happy</li>
<li>hot</li>
<li>humbled</li>
<li>humiliated</li>
<li>hungry</li>
<li>hurt</li>
<li>impressed</li>
<li>in_awe</li>
<li>in_love</li>
<li>indignant</li>
<li>interested</li>
<li>intoxicated</li>
<li>invincible</li>
<li>jealous</li>
<li>lonely</li>
<li>mean</li>
<li>moody</li>
<li>nervous</li>
<li>neutral</li>
<li>offended</li>
<li>playful</li>
<li>proud</li>
<li>relieved</li>
<li>remorseful</li>
<li>restless</li>
<li>sad</li>
<li>sarcastic</li>
<li>serious</li>
<li>shocked</li>
<li>shy</li>
<li>sick</li>
<li>sleepy</li>
<li>stressed</li>
<li>surprised</li>
<li>thirsty</li>
<li>worried</li>
</ul>
</section1>
<section1 topic='Mapping to Wireless Village Moods' anchor='wv-mapping'>
<p>The Wireless Village (now "IMPS") specifications for mobile instant messaging define a number of presence attributes, encapsulated in the "StatusMood" information 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>. 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:</p>
<ul>
<li>ANGRY</li>
<li>ANXIOUS</li>
<li>ASHAMED</li>
<li>BORED</li>
<li>EXCITED</li>
<li>HAPPY</li>
<li>IN_LOVE</li>
<li>INVINCIBLE</li>
<li>JEALOUS</li>
<li>SAD</li>
<li>SLEEPY</li>
</ul>
<p>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.</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
<p>The XML character data values of the &lt;value/&gt; 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 &lt;text/&gt; element as well (as explained in &rfc2277;, "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).</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>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.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; includes 'http://jabber.org/protocol/mood' in its registry of protocol namespaces.</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/mood'
xmlns='http://jabber.org/protocol/mood'
elementFormDefault='qualified'>
<xs:element name='mood'>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element name='afraid' type='empty'/>
<xs:element name='amazed' type='empty'/>
<xs:element name='angry' type='empty'/>
<xs:element name='annoyed' type='empty'/>
<xs:element name='anxious' type='empty'/>
<xs:element name='aroused' type='empty'/>
<xs:element name='ashamed' type='empty'/>
<xs:element name='bored' type='empty'/>
<xs:element name='brave' type='empty'/>
<xs:element name='calm' type='empty'/>
<xs:element name='cold' type='empty'/>
<xs:element name='confused' type='empty'/>
<xs:element name='contented' type='empty'/>
<xs:element name='cranky' type='empty'/>
<xs:element name='curious' type='empty'/>
<xs:element name='depressed' type='empty'/>
<xs:element name='disappointed' type='empty'/>
<xs:element name='disgusted' type='empty'/>
<xs:element name='distracted' type='empty'/>
<xs:element name='embarrassed' type='empty'/>
<xs:element name='excited' type='empty'/>
<xs:element name='flirtatious' type='empty'/>
<xs:element name='frustrated' type='empty'/>
<xs:element name='grumpy' type='empty'/>
<xs:element name='guilty' type='empty'/>
<xs:element name='happy' type='empty'/>
<xs:element name='hot' type='empty'/>
<xs:element name='humbled' type='empty'/>
<xs:element name='humiliated' type='empty'/>
<xs:element name='hungry' type='empty'/>
<xs:element name='hurt' type='empty'/>
<xs:element name='impressed' type='empty'/>
<xs:element name='in_awe' type='empty'/>
<xs:element name='in_love' type='empty'/>
<xs:element name='indignant' type='empty'/>
<xs:element name='interested' type='empty'/>
<xs:element name='intoxicated' type='empty'/>
<xs:element name='invincible' type='empty'/>
<xs:element name='jealous' type='empty'/>
<xs:element name='lonely' type='empty'/>
<xs:element name='mean' type='empty'/>
<xs:element name='moody' type='empty'/>
<xs:element name='nervous' type='empty'/>
<xs:element name='neutral' type='empty'/>
<xs:element name='offended' type='empty'/>
<xs:element name='playful' type='empty'/>
<xs:element name='proud' type='empty'/>
<xs:element name='relieved' type='empty'/>
<xs:element name='remorseful' type='empty'/>
<xs:element name='restless' type='empty'/>
<xs:element name='sad' type='empty'/>
<xs:element name='sarcastic' type='empty'/>
<xs:element name='serious' type='empty'/>
<xs:element name='shocked' type='empty'/>
<xs:element name='shy' type='empty'/>
<xs:element name='sick' type='empty'/>
<xs:element name='sleepy' type='empty'/>
<xs:element name='stressed' type='empty'/>
<xs:element name='surprised' type='empty'/>
<xs:element name='thirsty' type='empty'/>
<xs:element name='worried' type='empty'/>
</xs:choice>
<xs:element name='text' minOccurs='0' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
</xep>