[Standards-JIG] LAST CALL: JEP-0106 (JID Escaping)

JD Conley jd.conley at coversant.net
Wed May 4 21:13:21 UTC 2005


Don't forget LDAP attributes/DN's if you're writing the transformation informational JEP.  :)  They also allow some of our forbidden characters.
 
-JD

________________________________

From: standards-jig-bounces at jabber.org on behalf of Peter Saint-Andre
Sent: Wed 5/4/2005 1:24 PM
To: Jabber protocol discussion list
Subject: Re: [Standards-JIG] LAST CALL: JEP-0106 (JID Escaping)



On Wed, May 04, 2005 at 02:29:03PM -0500, Peter Saint-Andre wrote:

> I still need to investigate what would happen if you try to transform
> an escaped JID into a URI/IRI (e.g., the semi-colon must be escaped in
> URIs).

RFC 3986 specifies that certain characters are reserved in URIs.
Although JIDs are not URIs (neither are mailbox addresses used in
email), they could be transformed into URIs/IRIs (whether they are
URIs or IRIs as specified in RFC 3987 has not yet been decided).

Consider the following email address:

   d'artagnan at example.org

Following JEP-0106 as it is currently specified, we would transform
that into the following JID:

   d#27;artagnan at example.org

Now let's say we want to make that into an XMPP URI or IRI; we need
to transform the ; character into %3b in accordance with RFC 3986:

   xmpp:d#27%3bartagnan at example.org

Now when someone decodes that address, they would transform %3b into ;
(and remove the scheme) to yield the JID:

   d#27;artagnan at example.org

However, if the mailbox were provided as a URI, it would already be
escaped using percent-encoding:

   mailto:d%27artagnan at example.org

Thus I think we would specify that an XMPP application would need to
percent-decode the URI before turning it into a JID. (The same would
be true of any URI -- sip:, sips:, im:, wv:, etc.)

If we use #xx rather than #xx; then we don't have to worry about
percent-encoding the ; character, but that's going to happen
automatically if you feed the JID to a URI encoder, so I don't think
using #xx; is a problem for that reason.

BTW, I think it would be helpful for me to write an informational JEP
describing all of the transformations between JIDs and other standard
addresses -- e.g., email, SIP, and Wireless Village. (I don't include
Sametime in that list because they don't use a standardized protocol
yet.)

/psa



More information about the Standards mailing list