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

Re: Feedback on draft-gregorio-uritemplate-00

From: James M Snell <jasnell@gmail.com>
Date: Thu, 05 Oct 2006 16:13:18 -0700
Message-ID: <4525918E.4040904@gmail.com>
To: uri@w3.org

Joe Gregorio wrote:
> On 10/5/06, Sam Ruby <rubys@intertwingly.net> wrote:
>> My vote: specify unicode and utf-8 throughout.  And ditch the perceived
>> requirement to allow template variables to optionally span multiple
>> segments, depending on the data values allowed.
> +1

One challenge I've had with the spec as it stands now is that template
replacement values are not defined.  If we don't want to allow a
replacement to span multiple segments, then I think we're going to have
to nail this down.

A template-var would be replaced by a template-value, which MUST match
the production:

  template-value = scheme / userinfo / host / port / reg-name /
                   segment / segment-nz / segment-nz-nc / query /

Any characters in the replacement that do not fit the production MUST be
percent-encoded.  Obviously the validity of the replacement is still
ultimately dependent on whether a valid URI is produced or not.

Also, given the feedback provided so far, I'm definitely comfortable
with requiring that the template processor perform the percent-encoding.


template-variable     replacement         template-value
  a             =     "foo"             =   "foo"
  b             =     "foo bar"         =   "foo%20bar"
  c             =     "foo/bar"         =   "foo%2Fbar"
  d             =     "foo@bar"         =   "foo@bar"
  e             =     "f"             =   "f%C3%B3%C3%B3"
  f             =     "foo?bar"         =   "foo%3Fbar"
  g             =     "foo#bar"         =   "foo%23bar"
  h             =     "foo:bar"         =   "foo:bar"
  i             =     "foo%20bar"       =   "foo%2520bar"

- James
Received on Thursday, 5 October 2006 23:13:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:10 UTC