- From: Marc Hadley <Marc.Hadley@Sun.COM>
- Date: Thu, 09 Nov 2006 17:35:20 -0500
- To: Joe Gregorio <joe@bitworking.org>
- Cc: uri@w3.org
- Message-id: <56BD10B0-62C7-4C1A-9F5B-27F499C3FF56@Sun.COM>
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.
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Thursday, 9 November 2006 22:35:37 UTC