[Standards-JIG] Live Chat extension to Chat States (JEP-0085)

Cedric Vivier cedricv at neonux.com
Tue Jan 4 16:36:08 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Live Chat extension aka WYSIWYCT (What You See Is What Your Contact Type
;)) or "Composing Body" for short.

I don't know if it's better to extend JEP-0085 or to propose another
brand new JEP superseding it.
I believe however it should just extends current JEP as this extension
is a "SHOULD" and shouldn't break compatibility with current JEP-0085
implementations (which are experimental anyway).

This extension allows some sort of 'really instantaneous IM' ;)



UPDATES TO CURRENT JEP:


5.1 Discovery of Support and Generation of Notifications

. A User MUST NOT send composing body notifications if the contact had
not sent an Active notification with a <body/> element.


5.2 Support Requirements

| Active                   | MUST   |
| Composing (without body) | MUST   |
| Composing (with body)    | SHOULD |
...

A client MUST allow the user to configure whether he or she wants to
send chat state notifications and MUST allow the user to disable
outgoing Composing Body even if chat state notifications are enabled.



5.8 Composing Body

When sending a composing notification <composing/> element can include a
<body/> element.
A client can then send words (ie. tokens) as the users type them in the
edit box alongside to composing notifications.
Clients SHOULD send the last word (delimited by spaces) typed after a
short delay (500ms for instance) and not send <body/> element at each
and every letter.

<body> has two optional attributes and can have plain text as content :

@mode
| value           | description
- ------------------------------------------------
| clear (default) | Reset composing body to content.
| append          | Append content to composing body.
| replace         | Replace last @count token(s) by content

@count
Default is 1.
It is used only when @mode is "replace" to define how many previously
appended tokens to replace.



6.1 A Simple Example With Composing Body Enabled

Example 5. User Sends Intitial Mesage With Active Notification

<message from="romeo at montague.net/orchard"
to="juliet at capulet.com/balcony" type="chat">
~ <body>Are you here Juliet ?</body>
~  <active xmlns="http://jabber.org/protocol/chatstates">
~   <body/>
~  </active>
</message>


Example 6. Contact's Sends Reply Plus Active Notification

<message from="juliet at capulet.com/balcony"
to="romeo at montague.net/orchard" type="chat">
~ <body>Yes I am.</body>
~  <active xmlns="http://jabber.org/protocol/chatstates">
~   <body/>
~  </active>
</message>


Example 7. User Sends Composing Notifications With Initial Body

<message from="romeo at montague.net/orchard"
to="juliet at capulet.com/balcony" type="chat">
~ <composing xmlns="http://jabber.org/protocol/chatstates">
~  <body>I</body>
~ </composing>
</message>


Example 8. User Continues Typing His Message

<message from="romeo at montague.net/orchard"
to=juliet at capulet.com/balcony" type="chat">
~ <composing xmlns="http://jabber.org/protocol/chatstates">
~  <body mode="append"> luv</body>
~ </composing>
</message>


Example 9. User Has Made A Mistake And So Corrects It

<message from="romeo at montague.net/orchard"
to="juliet at capulet.com/balcony" type="chat">
~ <composing xmlns="http://jabber.org/protocol/chatstates">
~  <body mode="replace"> love</body>
~ </composing>
</message>


Example 10. User Has Finished Composing His Message

<message from="romeo at montague.net/orchard"
to="juliet at capulet.com/balcony" type="chat">
~ <body>I love you!</body>
~ <active xmlns="http://jabber.org/protocol/chatstates">
~  <body/>
~ </active>
</message>



11. XML Schema

This:
<xs:element name='active' type='empty'/>
<xs:element name='composing' type='empty'/>

Becomes this:
<xs:element name='active'>
~ <xs:element name='body' minOccurs='0' maxOccurs='1' type='empty'/>
</xs:element>
<xs:element name='composing'>
~ <xs:element name='body' minOccurs='0' maxOccurs='1'>
~  <xs:complexType>  <!-- xmpp-im rfc 3921 schema -->
~   <xs:simpleContent>
~    <xs:extension base='xs:string'>
~     <xs:attribute name='mode' use='optional' default='clear'>
~      <xs:simpleType>
~       <xs:restriction base='xs:NCName'>
~        <xs:enumeration value='clear'/>
~        <xs:enumeration value='append'/>
~        <xs:enumeration value='replace'/>
~       </xs:restriction>
~      </xs:simpleType>
~     </xs:attribute>
~     <xs:attribute name='count' type='xs:positiveInteger' use='optional'
default='1'/>
~     <xs:attribute ref='xml:lang' use='optional'/>
~    </xs:extension>
~   </xs:simpleContent>
~  </xs:complexType>
~ </xs:element>
</xs:element>



- --cedricv
jid: cedricv at jabber.neonux.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQdrF+C7DGrBzh2VQAQJcmQgAoqbue0TgpC9hn07Dt1zlJ7N1aO93lqmr
Isj+RzN24RJC8oZdMpgaf89sJku46Qp+1mquG3l503QMsRQQeRh5ObOKVIccoKbT
zcwch7I0g0Rv9bag+WEGIKqWiJcfyFjA17FvJINq7QPm+RmyBq3Dmc/EoPSABinh
FpeengdrWy/0OaaUyRSjD+J3xu6n1ElkFD119FBBxPlwQ7HVurd0EcfGpOeP7jN6
NUHMuCUSw3uMT8cHqDLA60GZzdV7gK+u79yvlk3tdwrRWgUDClD1gSo5WdmTRc1N
+J+Upa1Vmhiuq+vZzNlJ3JqD93Re0DsbBlvwSP1wA1RRj+t3YIXOtw==
=yjEF
-----END PGP SIGNATURE-----




More information about the Standards mailing list