Re: [Standards] Name of IQ query nodes

2010-12-18 Thread David Ammouial
18/12/10, Matthew:
> There are no implicit restrictions, if no text states that the child
> element must be  then it need not be. In the early days a lot
> of specs used  by convention, but there is no need for it and
> it was abandoned in later extensions as you can see.

Thanks for the clarification about the tag name.

> "
>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?

I have, although I don't know it by heart. When I looked again for the
number of expected children, I couldn't find it. Sorry for the noise
about that part.

-- 
David


signature.asc
Description: PGP signature


Re: [Standards] Name of IQ query nodes

2010-12-18 Thread Matthew Wild
On 18 December 2010 22:44, David Ammouial  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  then it need not be. In the early days a lot
of specs used  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  was
still in use. They just happen to use , 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
, 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
.

> 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  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


Re: [Standards] Name of IQ query nodes

2010-12-18 Thread Michal 'vorner' Vaner
Hello

On Sat, Dec 18, 2010 at 04:44:36PM -0600, David Ammouial wrote:
> It is not clear from the specification what the name of the query node
> of an IQ may (or should) be.
> 
> 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.
> 
> 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'.

It is used and is considered correct to use any name for it. It will have
unknown namespace from the point of the RFC, so telling it the name is out of
scope.

It is considered incorrect to have multiple child elements. Or, the query (set
or get) must have exactly one. Result can have up to one and error can have
more.

It is quite clearly defined in section 9.2.3 of RFC 3920 (XMPP CORE). The fact
that 3921 (XMPP IM, that is „on top“ of 3920) uses only query does not change
anything.


If anything relies on it being called query, then it is broken in two manner.
First, the fully qualified name is never query, but includes the namespace, and
second, 3920 simply says a child element, not specifying which one.

With regards

-- 
Never underestimate the bandwidth of a station wagon full of HDDs.

Michal 'vorner' Vaner


pgpJYQpNAXqcL.pgp
Description: PGP signature


[Standards] Name of IQ query nodes

2010-12-18 Thread David Ammouial
[Note to the list moderators: I sent the same email a moment ago,
before subscribing to the list. Please discard it.]

Hello,

It is not clear from the specification what the name of the query node
of an IQ may (or should) be.

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.

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'.

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.

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.

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.

[1] See source code of IQ class:
http://xmpppy.sourceforge.net/apidocs/xmpp.protocol.Iq-class.html

Regards.
-- 
David


signature.asc
Description: PGP signature