[JDEV] Rich Text in Messages
Michael F Lin
mflin at us.ibm.com
Mon Dec 11 05:37:25 CST 2000
Ryszard (any everyone),
For your day-to-day Jabber chats I don't think sending two versions of the
message is a huge problem, even on 19.2kbps wireless connections. I do
accept that it is not the most efficient way to go about this, however, and
so I propose that we extend jabber:iq:version to support something along
these lines:
<iq
type="result"
from="hamlet at denmark/castle"
to="horatio at denmark"
id="1001">
<query xmlns="jabber:iq:version">
<name>WinJab</name>
<version>0.9.1.1</version>
<os>NT 4.0</os>
<capabilities>
<xhtml/>
<revenge/>
...
</capabilities>
</query>
</iq>
I think support for something like this will be increasingly important as
client software matures and begins to support more features that must have
support on both ends of a chat. The client software I am readying currently
uses a scheme similar to yours to determine if it should use XHTML
formatting, image embedding, hyperlinks, etc. But, being restricted to my
software alone obviously has serious problems. For one, the AIM client can
understand a good subset of HTML, so there is no reason not to send it most
types of markup, even if it is not totally XHTML-friendly (this could be
solved with a quick XSLT).
There will need to be some sort of definitive list of valid capabilities
which can be easily added to as client software matures.
As for groupchat, this is indeed a difficult problem. In my opinion, the
best way is to send both formats as is currently shown in the JPG. This
will increase bandwidth usage, but I think for most purposes it will be
acceptable, and it will eliminate the need for complex polling to see if
there are any XHTML-unaware clients. If we extend jabber:iq:version as
above, perhaps the groupchat transport can keep track of what each client
supports, and then strip out the XHTML if it is unecessary?
Regards,
Mike Lin
IBM Extreme Blue Software Intern
mflin at us.ibm.com
-
"Ryszard Sommefeldt" <ryszards at xnl-interactive.com>@jabber.org on
12/10/2000 07:43:34 PM
Please respond to jdev at jabber.org
Sent by: jdev-admin at jabber.org
To: <jdev at jabber.org>
cc:
Subject: Re: [JDEV] Rich Text in Messages
Hi,
Good question! There is no way for a non HTML/XHTML
aware application to just display the raw text. This problem
exists for all 'aware' clients (are there any others?).
Currently, when my client communicates with another client,
it does a jabber:iq:version 'get' and if my client is found to be
at the other end, it safely sends a formatted message, otherwise
it sends plain text for compatibility.
With groupchat, I envisage it requiring a change to the
transport to fix the problem.
When joining or starting a groupchat, the client
should notify groupchat that it is aware of message formatting.
Current non-aware clients would not know to send this extra
info, so groupchat should assume they are unaware clients.
Then when an aware client sends a formatted message, it should
piggy back the plain text of the message onto the formatted
message (an extra field?).
Then groupchat decides what to send other clients participating
in the groupchat. If the client has registered itself as being aware,
send it the formatted message, otherwise send the plain text.
Hopefully these changes to groupchat wouldn't break any
existing client.
Using extended namespaces and always sending a formatted
message no matter what, has problems. Firstly, an excess of
data is sent to clients that are not aware. There is no need
to send a formatted message, even 'hidden' in an 'x' tag, to
a client that is unaware.
With light clients, such as those running on pocket PC's or
any machine with limited bandwidth, you need to optimise
the data you send over the wire.
My current implementation doesn't send a formatted message
if it isn't necessary, at least in the normal message case. With
the modified groupchat case, there is only an excess of data
sent by aware clients. A modified groupchat would minimise
the data sent to clients, depending on reported capabilities.
Just my ideas....
Ryszard
----- Original Message -----
From: "Justin Van Patten" <kvanpat790 at yahoo.com>
To: <jdev at jabber.org>
Sent: Saturday, December 09, 2000 10:14 AM
Subject: Re: [JDEV] Rich Text in Messages
> Ryszard,
>
> How are you doing this? How will the clients that
> aren't able to "format" text be able to get to the
> plain text?
>
> Thanks,
> Justin Van Patten
> JID: justinvp at hotjabber.com
> IRC: JustinVP
>
> --- Ryszard Sommefeldt <ryszards at xnl-interactive.com>
> wrote:
> > I have a Win32 client in development (unreleased)
> > that
> > does message formatting using HTML and XHTML
> > Basic. It does so with Groupchat and normal Jabber
> > messages.
> >
> > Ryszard
> >
> > ----- Original Message -----
> > From: "Justin Van Patten" <kvanpat790 at yahoo.com>
> > To: <jdev at jabber.org>
> > Sent: Wednesday, December 06, 2000 2:39 AM
> > Subject: [JDEV] Rich Text in Messages
> >
> >
> > > The JPG states that:
> > >
> > > "To extend messages for more 'rich' text, the
> > Jabber
> > > protocol encourages use of XHTML Basic. A plain
> > text
> > > copy of the message should be included in the
> > standard
> > > body so that clients that do not support XHTML
> > Basic
> > > can still view the message."
> > >
> > > The above citation can be found here:
> > >
> > > http://docs.jabber.org/jpg/refmessage.html
> > >
> > > I am curious if any client applications support
> > 'rich'
> > > text. When I say 'rich' text, I'm referring to
> > > messages that are formatted, to be a particular
> > color,
> > > font face, bold/italic/underlined, etc.
> > >
> > > Any information on this would be appreciated.
> > Thanks!
> > >
> > > Regards,
> > > Justin Van Patten
> > > JID: justinvp at hotjabber.com
> > > IRC: JustinVP
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Shopping - Thousands of Stores. Millions of
> > Products.
> > > http://shopping.yahoo.com/
> > >
> > > _______________________________________________
> > > jdev mailing list
> > > jdev at jabber.org
> > > http://mailman.jabber.org/listinfo/jdev
> > >
> >
> >
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list