[JDEV] Re: [Win32-dev] Interface Ad Ins?

Keith Minkler keith at digix.net
Tue Dec 21 13:32:20 CST 1999


You are 100% correct, and thanks for clarifying for everyone.. :)  I prolly
couldn't have explained it that good.. :)

-----Original Message-----
From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org]On Behalf Of
C. Scott Ananian
Sent: Tuesday, December 21, 1999 2:08 PM
To: jdev at jabber.org
Cc: julian at linuxpower.org
Subject: RE: [JDEV] Re: [Win32-dev] Interface Ad Ins?


So here's the deal, as I understand it.

*Any* tag can define a new namespace.
*However* that tag *needs to be valid in the original DTD*.

The only tags valid in <message>, according to
     http://protocol.jabber.org/jabber/jabber.dtd
are <body>, <x>, <subject>, <thread>, and <priority>.

<ticker> is *not* a valid tag inside <message>.  Neither is
{jabber::ticker}ticker.

However, *anything* can be included inside the <x> tag, and by convention
that anything is a valid XML document in the namespace given by the xmlns
attribute.

I hope I've understood this correctly; see
  http://protocol.jabber.org/jabber/jabber.dtd
and the validity constraints in
  http://www.w3.org/TR/1998/REC-xml-19980210
as well as the helpful namespace clarification at
  http://www.jclark.com/xml/xmlns.htm
which clarifies that "The XML Namespaces Recommendation does not define a
kind of validity distinct from XML 1.0 validity".

Strictly speaking, I believe that the DTD specified in
  http://protocol.jabber.org/jabber/jabber.dtd
is wrong, in that 'xmlns' can't be defined as an explicit attribute of the
<x> tag.  That is, the 'xmlns' attribute in this fragment

<message>
<x xmlns="foo">
...
</x>
</message>

changes the namespace *of the x element itself*.  {foo}x is not a valid
tag in message.  The correct syntax is:

<message>
<x xmlns:bar="foo">
  <bar:sometag>....</bar:sometag>
</x>
</message>

By using 'xmlns:bar', only those tags beginning with 'bar:' have their
namespace altered.  The 'x' tag is still in the original namespace
(because it does not have a 'bar:' prefix) and thus is still a legal tag
in the <message> context.

I hope I haven't muddied the waters too much.
 --s
[cc'ed to julian, the original author of the jabber.dtd file, so he can
 make sure i'm not smoking crack here.]
                                                         @ @
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
 C. Scott Ananian: cananian at lcs.mit.edu  /  Declare the Truth boldly and
 Laboratory for Computer Science/Crypto /       without hindrance.
 Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
 -.-. .-.. .. ..-. ..-. --- .-. -..  ... -.-. --- - -  .- -. .- -. .. .- -.
 PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian

FBI fissionable struggle Indonesia President security Japan Mossad
quiche strategic Leitrim Peking Castro [Hello to all my fans in domestic
surveillance]



_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev





More information about the JDev mailing list