[PATCH] compliance with section 9.2.3 of RFC 3920 (IQ Semantics)

Pedro Melo melo at simplicidade.org
Tue Jan 16 00:28:59 UTC 2007


On Jan 13, 2007, at 12:50 PM, Martin Atkins wrote:

> Pedro Melo wrote:
>> Hi,
>> See http://rfc.net/rfc3920.html#s9. for reference, search for 9.2.3.
>> Basically, to match an IQ with a semantic meaning, we must look at  
>> the namespace and not at the tag the first child is using. The  
>> relevant text of the RFC:
>>   "The data content of the request and response is defined by the  
>> namespace
>>    declaration of a direct child element of the IQ element"
>> That means for example, that as long as I use xmlns='vcard-temp'  
>> in the first child, the tag name can be vCard, query, or even  
>> sometagnobodyneedstoknow.
>> The attached patch fixes the signature method of the IQ class, and  
>> changes all the occurences of a set/get-{ns}tag I could find.
> Hmm.
> While I agree with you that the XMPP RFC section you referenced  
> gives the impression that the element's local name is to be  
> disregarded, I'm not convinced that this was the intention.

Well, when we question the intention, the better way to solve it is  
to question the author :)

Peter, can you weight in on this? When matching IQ's, should we just  
use the namespace or is the node name also relevant?

I believe I saw something to the effect that we should use the name  
used by the requester in the reply we give, and if we initiate the  
query we should use the name in the XEP because some elements in the  
network assume the name is important...


> I don't really see the value in ignoring the local name entirely.  
> Are there existing implementations that rely on this? Are you sure  
> that there *aren't* existing iq-based extension protocols that rely  
> on distinctions between iq element names in the same namespace?

I think we should generate the proper names, and we should reply  
using the name given to us by the client, in case he has a problem  
like that.

But I also think that if someone send us a <query xmlns='vcard-temp'>  
the VCard plugin should get it.

Best regards,
Pedro Melo
Blog: http://www.simplicidade.org/notes/
Jabber ID: melo at simplicidade.org
Use Jabber!

More information about the Djabberd mailing list