Re: URI Templates, percent-encoding, bnfs and working code

James M Snell scripsit:

> My first thought on seeing this was to wonder if we'd need some way of
> indicating both a prefix and postfix for a single variable.

Not a problem.  If you want to get the value of foo wrapped in parens,
but omit the parens if foo is undefined, you write:

	{<(|foo}{?)|foo}

>   http://www.google.com/search{??|term,num}{,&|term,num}

Currently {?foo|a,b,c} isn't supported: that's defect #11.

> While I'm perfectly happy restricting things to UTF-8, I'm wondering if
> there isn't a simple means by which we can explicitly establish an
> encoding within the template language. 

It's not about the template language's encoding: the template language
is defined in terms of characters.  It's about how characters written
from variables to the final URI get %-encoded.

-- 
John Cowan   http://ccil.org/~cowan    cowan@ccil.org
In might the Feanorians / that swore the unforgotten oath
brought war into Arvernien / with burning and with broken troth.
and Elwing from her fastness dim / then cast her in the waters wide,
but like a mew was swiftly borne, / uplifted o'er the roaring tide.
        --the Earendillinwe

Received on Saturday, 13 October 2007 18:39:11 UTC