W3C home > Mailing lists > Public > uri@w3.org > December 2006

RE: URI and IRI Templating (What did I get myself into?)

From: Mike Schinkel <mikeschinkel@gmail.com>
Date: Fri, 22 Dec 2006 19:07:14 -0500
To: "'Joe Gregorio'" <joe@bitworking.org>, <uri@w3.org>
Message-ID: <000001c72626$4d3f1120$0702a8c0@Guides.local>

Joe Gregorio wrote:
> We have several open issues:
> 
> 1. Deciding which characters to escape.
> 2. Reserving some character in template variable names
>     for future use, ala ':' for XML namespaces.
> ...
>
> We have two choices:
> 
> 1. Define a mechanism that is only guaranteed to meet the UR
>     syntax (i.e. RFC 3986), and thus potentially generate
>     URIs that are invalid in some schemes.
> 2. Restrict ourselves to URIs of a particular scheme such    as http:
> or mailto:. 

Part #1 and part #2 (see below.)

> So we have a few possibilities:
> 
> 1. Escape all 'reserved' characters except @, :, and /
>     across every component, realizing
>     we may not end up with a valid URI.
> 2. Escape all 'reserved' characters except @, and :,
>     realizing that our 'path' example
>     will then break since '/' will get escaped.
> 3. Escape all 'reserved' characters except @, :, and /,
>     but only allow template variables in path, query and     fragment
> components. 

Wonderful analysis Joe; you definitely have a gift for explaining complex
subjects.

Regarding the possibilities, is there not the possibility of a #4? To me #4
would be defining rules on a scheme basis, and tackle the known schemes that
are of most concern for this proposal at the moment?  It would seem that is
safer because you could test with all known schemes and thus it would not be
valid to apply to as-of-now-unknown schemes until the RFC is revised to
include them unless the new schemes follow the rules of an existing scheme,
for example http?  

Unless I make a mistake, that would allow you to escape "@" in http and ftp?
I know this proposal forces future update, but new schemes are not all that
common and it would be yet another barrier for adding a new scheme, which I
think would be a Good Thing. 

Also, could you not have different rules for authority vs. path+etc?  Those
are well-known distinctions that are easily parsable.

Thanks for listening.

-- 
-Mike Schinkel
http://www.mikeschinkel.com/blogs/
http://www.welldesignedurls.org/
Received on Saturday, 23 December 2006 00:07:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:36 GMT