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 :)
Vadim