[JDEV] Rich Text in Messages

tcharron tcharron at ductape.net
Mon Dec 11 15:43:55 CST 2000


From: "David Waite" <dwaite at jabber.com>
To: <jdev at jabber.org>
Subject: Re: [JDEV] Rich Text in Messages
> The fact is that if x or query are listed in any existing jabber DTD, that
is
> an error.  We aren't talking about extending the jabber DTD, but allowing
a
> new type of data to be inserted/'spliced'.

  No, x is listed in the DTD for a very specific reason.  It is listed in
the DTD so it can exist, have an xmlns, and any contained data be part of an
external DTD.  It was added so that new extentions could be created, and
continue to comply with the specified DTD.  Now there is also the case with
XML namespaces that the root tag must be part of the DTD.  This is why you
cannot simply say <x xmlns="somenamespace">, becouse the x tag is not
defined in the external DTD.  The *ONLY* way one can, by the rules, do it
is:

 <x xmlns="jabber:x:xhtml>
 <html xmlns=="http://www.w3.org/1999/xhtml">
 All Me XHTML Data
 </html>
 </x>

  The 'x' is part of the Jabber DTD.  With an xmlns attribute you are saying
'Everything within this tag is part of another namespace', hence, allowing
you to have anything inside you wish.

  The NEXT line states a tag that is in yet another namespace.  Becouse of
this, the jabber:x:xhtml namespace must describe 'x' as a top level tag, and
html as a child tag.

> If you just put 'html' without the xmlns, it would indeed be an error as
you
> would still be using the jabber DTD. As soon as you put a new default
> namespace, you are now using that namespace's DTD.

  We are not disagreeing here.  Yes, the namespace needs to be applied
correctly.  However, trying to enforce the child xml namespaces, and
completely disregarding the Jabber DTD is in conflict.  If you throw the
DTD's to the wind in one case, why not the other?

  Adding new tags to the DTD on the fly shouldn't be done.  When the
definition changes, thats a brandie spanking new DTD.  That's why RSS 0.9
and 0.91 have completely different xmlns entries.  Even though one was
simply an extention of the other, they required an entirly new DTD.  This is
why the 'x' tag was created.  By allowing it to contain foreign xmlns's, it
allows you to 'jump out' of the Jabber DTD into another.  It *CANNOT* be
done directly.  Think of the x tag as an 'adapter' tag that allows the jump
to occur between two namespaces that may know NOTHING about eachother.  It
provides the 'adapter' DTD.





More information about the JDev mailing list