Re: Rolled up Feedback on draft-gregorio-uritemplate-00

On Nov 9, 2006, at 5:07 PM, Joe Gregorio wrote:
>
> 1. Start with a 'string' for each variable value, and by 'string'
>   I mean a series of unicode characters.
> 2. encode that string as 'utf-8'
> 3. %-encode each octet not in:
>    "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";" / ALPHA /
> DIGIT / "-" / "." / "_" / "~"
>
>  [That's (unreserved/pct-encoded/sub-delims) with '&' and '='  
> removed.]
> This will force the %encoding of "/", ":", "&", "=" and "@" among  
> others.
>
> So
>
>   a = "name=fred"
>   http://example.org/{a}
>
> expands to:
>
>   http://example.org/name%3Dfred
>
> and
>
>   name = joe.gregorio
>   mailto:{name}@gmail.com
>
> expands to:
>
>   joe.gregorio@gmail.com
>
But you can't have mailto:{address} which seems a little unfortunate.

Another concern if we eliminate segment spanning variables is how to  
define a template for something like

http://example.com/webdav_root/{path}

where {path} is some arbitrary path on a WebDAV server.

I also got some feedback on the users@wadl.dev.java.net mailing list  
that the spec should require at least one reserved character between  
template variables since, in the general case, its impossible to work  
out the values of the template variables after substitution. E.g.  
given the template

http://example.com/{foo}{bar}

and the URI

http://example.com/xyzzy

you can't tell what the values of foo and bar are.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.

Received on Thursday, 9 November 2006 22:35:37 UTC