Ralph Meijer
Beyond Instant Messaging:
A Jabber Identifier (JID) has one of three forms:
example.org |
server |
localpart@example.org |
user, room, device, etc. |
localpart@example.org/tablet |
specific instance |
presence |
Publish-subscribe for entity availability |
message |
One-off messages |
iq |
Request-response semantics |
For each there are stanza-level (extensible) errors
Client sends presence to its server:
<presence>
<show>away</show>
<status>Away from keyboard</status>
</presence>
Server broadcasts presence:
<presence from="user@example.org/Tablet"
to="other@example.com/mobile">
<show>away</show>
<status>Away from keyboard</status>
</presence>
<message from="user@example.org/Tablet"
to="other@example.com"
type="chat">
<body>Hello, world!</body>
</message>
<message>
<body>Wow, I'm green with envy!</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-size:large'>
<em>Wow</em>, I'm <span style='color:green'>green</span>
with <strong>envy</strong>!
</p>
</body>
</html>
</message>
Wow, I'm green with envy!
<message from='portia@merchantofvenice.lit'
to='bassanio@merchantofvenice.lit'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/geoloc'>
<item id='d81a52b8-0f9c-11dc-9bc8-001143d5d5db'>
<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
<lat>45.44</lat>
<lon>12.33</lon>
<accuracy>20</accuracy>
<locality>Venice</locality>
<country>Italy</country>
</geoloc>
</item>
</items>
</event>
</message>
<iq type='get' id='info4'
from='juliet@capulet.com/balcony'
to='romeo@montague.net/orchard'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
<iq type='result' id='info4'
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity category='client' type='pc' name='Gabber'/>
<feature var='jabber:iq:time'/>
<feature var='jabber:iq:version'/>
</query>
</iq>