[Standards-JIG] Re: query component in XMPP URIs

Peter Saint-Andre stpeter at jabber.org
Mon Oct 25 22:26:41 UTC 2004


In article <stpeter-4E68C5.11113830092004 at sea.gmane.org>,
 Peter Saint-Andre <stpeter at jabber.org> wrote:

> In article <cje34q$fgr$1 at sea.gmane.org>,
>  Nolan Eakins <sneakin at semanticgap.com> wrote:
> 
> > Peter Saint-Andre wrote:
> > > 3. Identifying NodeIDs such as those used in JEP-0030 and JEP-0060
> > > (e.g., "click here to subscribe to a weather feed for your area").
> > 
> > ...
> > 
> > > xmpp:pubsub.example.com?node=foo
> > 
> > May I suggest "xmpp:pubsub.example.com#foo" for the above unless '#' is
> > allowed anywhere in a JID. That would obviously come after the resource,
> > ie: "xmpp:pubsub at example.com/resource#foo".
> 
> Yes, this makes some sense for node identifiers, since they can be seen 
> as "fragments" of an address, if you will. But the actual URIs would 
> probably be more like <xmpp:pubsub.example.com#NodeID>. Note also that 
> JEP-0060 allows a pubsub node to have a JID (e.g., it can be of the form 
> <pubsub.example.com/NodeID> or <NodeID at pubsub.example.com>), so quite 
> possibly this is not necessary, but it may prove useful for certain 
> kinds of pubsub implementations and also in service discovery.
> 
> > I did glance through the nodeprep and resourceprep sections of xmpp-core. I
> > didn't see anything that prohibited a pound sign in a JID 
> 
> This would be used in XMPP URIs only, not in (native) JIDs. Over XMPP 
> itself, we already have ways to "direct" a stanza to the attention of a 
> particular node (both in JEP-0030 and JEP-0060), so there is no reason 
> to add this to the JID spec in XMPP Core. The difference between a 
> native JID and a non-native XMPP URI is explained in the XMPP URI spec.
> 
> > or a question
> > mark, but I could still be wrong. If they're currently allowed, then '?'
> > may need to be prohibited in resourceprep or switch the '?' in your
> > examples to use '&' instead. 
> 
> Not really. See the XMPP URI draft for a discussion of this; the basic 
> principle is to escape the "?" character in the URI if it occurs in the 
> resource identifier of the underlying JID. This is necessary since the 
> "?" character has meaning in a URI (i.e., it signals that everything 
> after "?" is part of the query component).
> 
> > That would munge up the key=value pairs
> > though--posibly. I guess it could signify the start of them and still be
> > used to seperate them.
> 
> Again, not really. I'll specify all this clearly in the next version of 
> the XMPP URI spec.
> 
> /psa

FYI, I submitted this a week or two ago:

http://www.xmpp.org/drafts/draft-saintandre-xmpp-uri-06.txt
http://www.xmpp.org/drafts/draft-saintandre-xmpp-uri-06.html

Feedback welcome.

Peter




More information about the Standards mailing list