[JDEV] Namespaces

Peter Saint-Andre stpeter at jabber.org
Wed Jul 10 23:06:24 CDT 2002


You might want to read this:

http://www.w3.org/TR/1999/REC-xml-names-19990114/

As well as the documents referenced from here:

http://www.jabber.org/ietf/

Peter

--
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.html

On Mon, 8 Jul 2002, Kriggs wrote:

> I'd like some confirmation on something right now. Can someone tell me if I'm 
> right in the following examples:
> 
> <a:b/>
> <a b="value"/>
> <tag a:b="value"/>
> <a><b/></a>
> <a xmlns="r">
> 
> where a is b's parent, and r is root? And am I forgetting anything?
> 
> OK, now to talk about a part of the Programmer's Guide that lost me:
> 
> "[...] The Jabber DTD is referenced from other XML documents and streams with 
> the identifier jabber:client.
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> 
> <!-- The root of it all. -->
> 
> <!ELEMENT jabber ((
>   presence | 
>   iq | 
>   message
> )*)>"
> 
> So the jabber element contains presence, iq and message. Where did x and 
> error go? And does the jabber here mean jabber:client:jabber? Which would 
> mean that for those tags, (presence, iq, message, ...) the jabber:... is 
> implied? Maybe it means stream:stream:jabber, with jabber:... still implied, 
> in which case the xmlns... just confuses me... Or maybe it's an error in the 
> documentation? Or maybe I'm not seeing something?
> 
> The clearest idea I have so far is that stream:stream is a "function" tag 
> that uses the jabber:client namespace. So everything inside of the 
> stream:stream uses jabber:client as it's parent. jabber:... would not be 
> implied, and so presence, iq, message, etc. would actually be 
> jabber:client:presence, jabber:client:iq, jabber:client:message, etc... All 
> (or most) namespaces, such as jabber:iq:auth and jabber:iq:version, pull from 
> the root level, meaning that jabber: is filled with a bunch of namespaces, 
> and jabber:client contains only the "function" tags. The root tags would be 
> stream: (for the transport layer's independence from jabber), jabber, and 
> anything we'd want to invent? If I didn't keep getting the impression that 
> there's an implied "jabber:..." in front of the main "function" tags, I would 
> have a better time believing my explanation :)
> 
> If the answer to all my hoohaa is that jabber just fakes having a 
> structure... well, for starters, I'd be very disappointed in what seemed like 
> such a good effort, then I'd use the explanation I've come up with, despite 
> it all. The chances of jabber evolving to have a tag of the same name at the 
> exact wrong place seems unlikely.
> 
> Can anyone tell me where I'm wrong and/or right in all this?
> 
> Thank you!
> 
> -Kriggs
> RBJab
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 




More information about the JDev mailing list