Re: draft-gregorio-uritemplate-02.txt

On Nov 26, 2007 11:56 AM, James M Snell <jasnell@gmail.com> wrote:
> Looks good overall, some comments:
>
> 1. varname is unnecessarily restrictive. There is no harm that I can see
>    in using the following:
>
>    unreservedsansdash  = (alphanum / "." / "_" / "~")
>    varname             = unreservedsansdash *(unreserved)
>
>    For URI Templates, this is *extremely* minor, but for IRI
>    Templates (see below) this will have a significant impact on
>    what characters can be used for varname (replace unreserved
>    with iunreserved)

That makes sense.


> 2. Did you decide against introducing cardinality indicators?
>    e.g., {-list|&|foo+,bar}.

I haven't decided against them, just waiting for more feedback,
particularly weighing cardinality  vs. required/optional
vs can-be-a-list indicators.

> 3. For -join, you need to specify what happens if the value is a list.
>    e.g., foo = ['a','b'] would expand to foo=a&foo=b

Yeah, I'd like to hear more opinions about using
lists in operators outside '-listjoin'.

> 4. There are interesting things that could be done if we allow prefix
>    and append to use list values.  The prefix or postfix would be
>    applied to each item  in the list. e.g., when foo = ['a','b'],
>    {-prefix|/|foo} would expand to "/a/b" and {-append|/|foo} would
>    expand to "a/b/".
>
>    http://example.org{-opt|/-|categories}{-prefix|/|categories}
>
>    http://example.org/-/a/b/c
>
>    http://example.org{-opt|/-/|categories}{-append|/|categories}
>
>    http://example.org/-/a/b/c/

I worry about introducing that level of complexity into the
specification/implementation.


> 5. We need to decide whether or not "extension operations" are going to
>    be allowed, and if so, how are they to be handled.  Should an
>    template processor signal an error if an unknown operation is used?
>    Should the processor replace the unknown token with an empty string?

I am leaning towards a 'must ignore' stance with respect to
unknown operators, i.e. replace the expansion with the empty string.

> 6. We should include a section on IRI Templates. I'll volunteer to write
>    it up if you'd like.  An IRI template is generally identical to the
>    URI Template with the exception of the characters allowed in varname,
>    arg and the replacements.  The following is taken from my expanded
>    ABNF:

So in the IRI case any characters outside ( iunreserved / pct-encoded )
in a variable value need to be percent-encoded, and we skip the UTF-8
encoding?

   -joe

-- 
Joe Gregorio        http://bitworking.org

Received on Monday, 26 November 2007 19:04:33 UTC