Re: URI Templates and Acceptable Values

Hi Ben,

(Even though I have been subscribed to this list for ages, I haven't kept
track of all of the discussions, so I can't help you directly.)

I also started to wonder about this today. The grammar suggests that you can
do something like this with all operators:

{operator|arg|var=val,var=val,var=val}

.... with val being the default value. Now the spec doesn't include any
examples doing this. I started to wonder what it would be like for the list
operator:

{-list|&|nodes=...}

The spec is inconclusive on how the default value should be represented. But
since the list operator only accepts list type of variables, it must be a
value.

I would say, we should either drop default values from the variable section
of the expansion expression, or introduce a way to represent list values.

Wilfred Springer

2008/3/10, Ben Ramsey <benramsey.lists@gmail.com>:
>
>
> I've combed through the list and can't find whether this has been
> previously discussed, so forgive me if I'm repeating something.
>
> I know that you can use a URI template to define a default value for a
> parameter (i.e. {foo=bar}), but has anyone discussed the use of a list of
> acceptable values for a parameter?
>
> Perhaps something like:
>
> {foo=[bar,baz,qux]}
>
> In this case, the only acceptable values for foo are bar, baz, and qux.
> Implementors would determine how to handle unacceptable values.
>
> If this has been discussed and decided against, what was the reasoning for
> rejecting this idea?
>
> --
> Ben Ramsey
> http://benramsey.com/
>
>
>

Received on Sunday, 6 April 2008 19:13:43 UTC