Ellis Pritchard wrote:
<map:act type="flow">
  <map:parameter name="function" value="foo"/>

I suggest <map:act function="flow"> -- see below...


  <map:parameter name="operand-a" value="{request-param:a}"/>
  <map:parameter name="operand-b" value="{request-param:a}"/>

   <map:generate src="bar/{result-a}/{result-b}"/>

Yes that's how I see it too.


   <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.


Vadim

Reply via email to