On 18 December 2010 22:44, David Ammouial <d...@weeno.net> wrote:
> [Note to the list moderators: I sent the same email a moment ago,
> before subscribing to the list. Please discard it.]
>
> Hello,
>

> In RFC 3921, it is implied that it is "query". However, there's no
> mention of whether this is a mandatory tag name or not.
>

There are no implicit restrictions, if no text states that the child
element must be <query/> then it need not be. In the early days a lot
of specs used <query/> by convention, but there is no need for it and
it was abandoned in later extensions as you can see.

The iq protocols that RFC 3921 describes such as the roster
interaction are older protocols defined at the time when <query/> was
still in use. They just happen to use <query/>, and you are correct in
deducing that this is not the only valid name.

> Because of that, and because there's no example of any other tag name
> in the whole RFC, I would tend to believe that it is indeed the only
> expected tag name. However, several XEPs use another one, for example
> 'vCard'.
>

RFC 3921 describes the core functionality for an IM-based XMPP server,
it's of no relevance that the protocols it happens to describe use
<query/>, don't read anything into it.

> I think the expected name is actually described in the definition
> of the corresponding namespace, which would mean that as far as the RFC
> is concerned, any name is in fact allowed, provided it honors the
> namespace's definition.
>

You are 100% correct.

> Am I right? In any case, we should maybe clarify this detail in the
> specification. I think several generic IQ-handling implementations rely
> on the tag being called "query", which breaks their behaviour in case
> the query tag has a different name. One example is xmpppy[1], but there
> might be existing or future others if the situation stays unclear.
>

Implementations making up rules that aren't described in the spec are
silly. There are many extensions (vcard being an example) that are in
common use and have been around for a long time that do not use
<query/>.

> As a related note, it doesn't seem clear either how many direct
> children an IQ stanza is supposed to have. All examples in the
> litterature show only one, but I can't see that defined anywhere.
>

"
       An IQ stanza of type "get" or "set" MUST contain one and only one
       child element that specifies the semantics of the particular
       request or response.
" -- http://tools.ietf.org/html/rfc3920#section-9.2.3

Just making sure - have you read 3920? It describes the core XMPP
protocol, which is what 3921 builds upon. Among other things it
defines the various stanza semantics. If <query/> were a restriction
then it would be mentioned in this document.

As for improving the specs, you're a bit late to the party. There are
new versions of 3920/3921 on track for publication as RFCs Real Soon
Now:

http://tools.ietf.org/html/draft-ietf-xmpp-3920bis
http://tools.ietf.org/html/draft-ietf-xmpp-3921bis
http://tools.ietf.org/html/draft-ietf-xmpp-address (the description of
the JID format has been split into a new spec)

Hope this helps,
Matthew

Reply via email to