Re: URI Templates - optional variables?

By default, a template processor doesn't invoke the code to process  
this type of convention, in this approach.

Instead, a template author has to nominate their use explicitly; e.g.  
a template variable definition may say "the foo convention is applied  
to the bar variable." Then, that code that implements that processing  
needs to be turned on, by some as-yet-undefined mechanism. If  
somebody ever comes up with a template variable definition language,  
it might be through that; otherwise, it's probably API-specific.

This is alluded to in section 3.3 of the current draft. As I said  
before, it's just one way forward. I'm not against others, as long as  
a) they don't make URI templates appreciably more complex to use in  
the default case (there's a fair amount of mindshare behind just  
using "http://example.com/foo/{bar}/baz" in documentation), and b)  
they don't profile or otherwise restrict the set of URIs you're able  
to template.

Cheers,


On 11/08/2007, at 5:48 AM, Mike Schinkel wrote:

>
>
> Mark Nottingham wrote:
>
>> My preference is to define a set of conventions (like the
>> ones you nominate below), without "turning them on" for a
>> basic template processor; their use should be specifically
>> nominated by the template author. That way, conventions like
>> starting with '=' don't get in the way of other users, such
>> as those that want to use bare URIs to refer to RDF in
>> template variable names (to pull something out of the air).
>
> What do you mean by "w/o turning them on?"  Wouldn't that just be  
> templates
> that don't include formatting rules?
>
> -- 
> -Mike Schinkel
> http://www.mikeschinkel.com/blogs/
> http://www.welldesignedurls.org
> http://atlanta-web.org - http://t.oolicio.us
>
>


--
Mark Nottingham     http://www.mnot.net/

Received on Saturday, 11 August 2007 02:23:30 UTC