[JDEV] Rich Text in Messages

tcharron tcharron at ductape.net
Mon Dec 11 10:50:55 CST 2000


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.

    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.





More information about the JDev mailing list