[JDEV] Rich Text in Messages

David Waite dwaite at jabber.com
Mon Dec 11 11:58:40 CST 2000


tcharron wrote:

> From: "Max Horn" <max at quendi.de>
> Subject: Re: [JDEV] Rich Text in Messages
> > ><html xmlns="http://www.w3.org/1999/xhtml">
> > >     Why would this not be part of an extended namespace, aka:
> > ><x xmlns="http://www.w3.org/1999/xhtml">
> > The x tag is really only thought for jabber only extensions.
> > In fact, you *have* to use <html
> > xmlns="http://www.w3.org/1999/xhtml"> if you ever want to validate
> > the jabber XML using a DTD. Reason: the XHTML DTD requires as root
> > element <html> - but the tag containing the xmlns attrib already
> > belongs to that NS; thus, you have to embed XHTML into a <xhtml>
> > element.
>
>     I think this opens up a whole new ball of worms when we start talking
> about validation.  While being a completely valid point, one could argue
> that changing the Jabber DTD by adding new tags causes any older clients to
> also fail the parse of the messages, due to just that.  It's now invalid,
> according the older DTDs.
>

It is not adding a new tag to the Jabber DTD. It is tacking a namespace onto
the 'document' which is the Jabber Session. It really is the correct way to do
things. Technically <x>/<query> do not belong to the jabber document at all,
but are there as 'recommendations' for jabber-related extensions.

There are already clients sending 'invalid' XML with vcards, since they use
the 'query' element rather than vCard as the root. Most clients which I have
seen that support vCards thus support both formats - they ignore the root
element tag.

To put it another way - I cannot pass the xhtml content off to a view control
without changing the 'x' tag to 'html' - the data being sent in that case
would be invalid.

-David Waite

>
>     I think we where in a general agreement that, due to the way we are
> treating XML documents, we can *NEVER* really validate Jabber documents.
> The best way I can possibly think to fix the above would be this:
>
> <x xmlns="jabber:x:xhtml>
> <html xmlns=="http://www.w3.org/1999/xhtml">
> All Me XHTML Data
> </html>
> </x>
>
>     This would allow the messages to be validatable by both DTD's, and life
> is all happy.
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev





More information about the JDev mailing list