[JDEV] Rich Text in Messages
Max Horn
max at quendi.de
Mon Dec 11 12:02:51 CST 2000
At 11:50 Uhr -0500 11.12.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 meant <html> not <xhtml>, sorry)
> 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.
Why would it break any older clients??? We use XML for Jabber exactly
because it *will not* break any older clients - unless the client
author is somehow... strange, i.e. can't read specs.
Jabber is XML based. Any jabber client must be able to parse XML. If
it encounters an unknown tag inside a jabber message, it should not
die or whatever, but instead just ignore it!
> 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.
Hm, well, it is sort of a kludge, but would propably work... only
question is, is this really needed?
Max
--
-----------------------------------------------
Max Horn
International C/C++/Internet Development
email: <mailto:max at quendi.de>
web: <http://www.quendi.de>
phone: (+49) 6151-494890
More information about the JDev
mailing list