cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: [announce] Extended sitemap variable substitution syntax
Date Tue, 25 Jun 2002 11:14:15 GMT
On 25.Jun.2002 -- 12:07 PM, Torsten Curdt wrote:
> On Tuesday 25 June 2002 10:39, Christian Haul wrote:
> > On 25.Jun.2002 -- 10:13 AM, Torsten Curdt wrote:
> Well, but I bet people want default values per use... (this is not a proposal 
> just an example ;) something like:

Well, from a "request:parameter" the "parameter" part is passed to
your module. If a fictious module existed that uses the parameter
string for more than the parameter, i.e. code the default value into
it like "parameter|default" or "parameter?default=default" and would
use anything 'till the first colon as a module name, one could write

	<map:parameter name="foo" value="{fictious-defaults:request:parameters/foo?default=bar}"/>

with "request:parameters/foo?default=bar" passed to
"fictious-defaults", which parses it to "request" and "parameters/foo"
plus "default=bar".

So no need for a complete language. Only that currently you can't nest
'em like "{fictious-defaults:{request:parameters/foo}?default={../bar}}" 
and I hope we won't see that. If that is needed, the
flow((map)|(script)) is the right place.

Actually, for such uses like the default value the configuration
object that is passed to the input module should be used. From the
sitemap, this is difficult to do in-line. Creating a configuration
from the parameters ("?default=bar") and using that is indeed worth

OTOH I believe that the current implementation is a big step forward
and while there is plenty of room to extend this concept, we should
gather hands-on experience first before attaching too many knobs to

> ..and this would be the beginning of the mini-scripting language be probabaly 
> all don't want inside the sidemap...



C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, email:

View raw message