Re: URI Templates - optional variables?

On 10/15/07, John Cowan <cowan@ccil.org> wrote:
> Marc Hadley scripsit:
>
> > I realize most folks are focussed on the template->URI conversion
> > process but I'm currently most interested in matching URIs to
> > templates and if we introduce the need to refer to external
> > processing extensions I don't see how such matching can be
> > implemented in the general case.
>
> That's very interesting.  Someone should see whether Joe's proposal
> is invertible: go from a URI and a template to a bunch of variables.

Nope, it's not an invertible mapping:

Template:
  http://example.org{?/|a}{?/|b}
URI:
  http://example.org/
Variables:
  a=True, b=False
      or
  a=False, b=True

I'm a bit rusty, but I believe it's the distinction between
a regular and a non-regular grammar.

   -joe

-- 
Joe Gregorio        http://bitworking.org

Received on Tuesday, 16 October 2007 04:42:41 UTC