Personal tools
You are here: Home Proposals X-Tag Emoticons in XMPP
Log in


Forgot your password?
 

X-Tag Emoticons in XMPP

— filed under:

Icons in Jabber should be very extensible, customizable, and use the "Jabber Way" to do things whenever possible. Therefore, these icons will be created using XML, which is native to all entities of the the Jabber platform, and is very easily translated and converted into other formats.

XML is the natural choice for doing graphical icons in Jabber because Jabber is XML. All of Jabber's tools heavily support XML and all of Jabber's developers are familiar with XML. And specifically on the case against plaintext or CDATA, any convention which breaks from the Jabber style to enforce plaintext processing with regexp or another model forces Jabber to re-focus (at least partly) its way of doing things.

Specification

Icons are created by defining references to them using Jabber's "X-Tags" within an XHTML body. When supporting clients receive and recognize them, they are replaced with the appropriate graphic and sound files.

Namespace
The namespace of the X-Tag to be inserted into the XHTML body is "http://jabber.org/protocol/xtag-emoticons".
Format
The format of the X-Tags that are inserted into the XHTML body follows the below W3C XML Schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:element name="x">
  <xs:complexType>
     <!-- "name" is the name of the icon that is being
displayed. This allows receipient clients to know
specifically what icon to use. -->
     <xs:attribute name="name" type="xs:string"/>
  </xs:complexType>
 </xs:element>
</xs:schema>
Icon List
Use the list of icons from Core Icon Guidelines for the X-Tag's "name" attribute. These should be supported in all compliant clients.
Graphic and Sound Files
When the receiving client recognizes an icon name, it converts that X-Tag into a graphic picture as well as possibly plays a short sound file. The exact graphic and sound files used by the client are completely up to the client and its developer. The developer should use files appropriate for their client's platform and intended user base.

Procedure

  1. The user selects the desired icon they wish to include in their message from their client's GUI (a drop-down list of supported icons, for example).
  2. The client translates the selected icon into an X-Tag using the appropriate "name" attribute. It is inserted into the XHTML body of the message, not the normal body since that does not support X-Tag.
  3. The client sends the XHTML message with the X-Tag to the intended recipient.
  4. The recipient client receives the XHTML message with the X-Tag.
  5. The recipient client runs a XML parser or other XML search over the incoming client, recognizes the X-Tag, and converts it into an appropriate icon, as well as possibly playing a sound to announce it.
Document Actions
« November 2008 »
November
MoTuWeThFrSaSu
12
3456789
10111213141516
17181920212223
24252627282930