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

Peter Saint-Andre stpeter at jabber.org
Tue Jan 16 20:56:21 UTC 2007


Pedro Melo wrote:
> Hi,
> 
> 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?

The primary identifier is the namespace, by which we really mean the 
schema associated with the namespace. Naturally there may be different 
elements qualified by that namespace, which have different semantics, so 
IMHO it is probably most accurate to say:

   The data content of the request and response is defined by the
   schema or other structural definition associated with the XML
   namespace that qualifies the direct child element of the IQ
   element.

No need to cc me, I'm on this list.

/psa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.danga.com/pipermail/djabberd/attachments/20070116/e4a43c1d/smime.bin


More information about the Djabberd mailing list