W3C home > Mailing lists > Public > uri@w3.org > November 2007

Re: Updated URI Template proposal

From: James M Snell <jasnell@gmail.com>
Date: Mon, 05 Nov 2007 10:36:29 -0800
Message-ID: <472F62AD.6040006@gmail.com>
To: Joe Gregorio <joe@bitworking.org>
CC: URI <uri@w3.org>

Looks good.  I will update my experimental java implementation of this
by the end of the week.  Comments below.

Joe Gregorio wrote:
> [snip]
> There are two issues that are outstanding:
> 1. Seven operations is a bit much. Prefix and append are both
>     convenience operators that can be done using 'opt'. Is it worth
>     dropping them to reduce the count to five?

I don't think it's a problem.  The operations defined are useful and clear.

The spec will likely need to indicate how new op codes are defined.  How
should unknown codes be handled?  Are applications free to create their
own op codes?  Is an iana registry needed? etc.

> 2. The 'sub' operator could either be defined to operate on
>     the octets of the variables value, or on the unicode character points
>     of the equivalent utf-8 decoded string. Both have their pros and cons.

I would think that unicode codepoints would be what folks would
typically expect.  If we need to support both, different op codes can be

  octets     = {-sub|0-1|username}
  codepoints = {-subc|0-1|username}

Next, regarding the varname definition,

  token varname    '[a-zA-Z0-9][a-zA-Z0-9\_\.\-]*' ;

I'm curious as to why these additional characters should not be allowed
in a varname?


For instance, allowing : and / would allow us to do...


Also, there had been mention of an escape/quote character for varnames,
for instance:


There are two varnames "a,b" and c.  This would allow things like:


Which is, of course, quite a bit more difficult to parse but provides
for interesting directions in extensibility and reuse/disambiguation of

Lastly, you had previously mentioned that the cardinality of vars with
the join op was an issue.  Could we not use +, * and ? for that?


  ? = 0 or 1 times (default)
  + = 1 or more times
  * = 0 or more times

  {-join|&|num} = num can be used 0 or 1 times
  {-join|&|num?} = num can be used 0 or 1 times
  {-join|&|num*} = num can be used 0 or more times
  {-join|&|num+} = num can be used 1 or more times

- James

>    Thanks,
>    -joe
Received on Monday, 5 November 2007 18:36:47 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:50 UTC