RE: URI Templates - optional variables?

Joe Gregorio wrote:
> Actually my intention was that everything from after the <op> 
> operator to the | would be put into the result w/o needing 
> further escaping. Using | as the separator means that no 
> special escaping is needed for |, ala \|, since that can 
> never legally appear in a URI. It makes the parsing much easier.

Forgive me if I'm not seeing it correctly but why would template vars (i.e.
the stuff inside braces) need to follow the same rules are URIs?  As far as
I understand, a URI Template is not a URI, it is a new entity specifically
designed to allow the creation of URIs.  Requiring URI Template *variables*
to follow the encoding rules for URI seems to me to invite tremendous
complexity where I don't currently see it being needed.

If I'm wrong on this point can you please explain why, and also give
concrete examples as I'm not so good in visualizing things when only
discussed in the abstract.

John Cowan wrote:
> You can't put the var first because there may be multiple vars.

But there are also multiple potential args, so that argument doesn't fly,
right?

Maybe what I'm having trouble with is the abstractness of the discussion.
Some good concrete explains would make this much easier to follow.

-- 
-Mike Schinkel
http://www.mikeschinkel.com/blogs/
http://www.welldesignedurls.org
http://atlanta-web.org 

Received on Monday, 15 October 2007 18:56:22 UTC