cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: RT: map:call as generic non-redirecting controller code
Date Tue, 10 Jul 2007 11:35:32 GMT
Ellis Pritchard wrote:
> On 10 Jul 2007, at 00:03, Vadim Gritsenko wrote:
>>>    <map:transform ...>
>>> </map:act>
>>> where foo() is:
>>> function foo() {
>>>     var a = cocoon.parameters['operand-a'];
>>>     ...
>>>     return {'result-a': 1, 'result-b': 'abc'};
>>> }
>>> Note that map:act has a @src attribute I haven't seen used much; I 
>>> wasn't proposing to add a @function, since this would require 
>>> changing the Action interface (arghh!), but I might (as well) use 
>>> @src to pass the function name.
>> True, attributes on map:act are not passed. But this (@function) can 
>> be implemented fairly easily by changing tree builder. CallNodeBuilder 
>> already does same thing - reacts on presence of @resource, @function 
>> attributes.
> Ok, but doesn't that mean having the Flow Action effectively 'hardwired' 
> by the builder, rather than just a using standard Action with a certain 
> calling convention?

One does not preclude another, isn't it? Action can accept "function" parameter 
and be called as usual; or be hardwired by tree processor - so regardless of 
chosen integration approach, action can be the same.

> I'm not really sure why that is necessary for the 
> sake of a little bit of semantics...

There is a bunch of hard wired components - <aggregator>, <notifier>, 
<translator>, <gatherer>... For the sake of a little bit of semantics :)


View raw message