Sylvain Wallez wrote:
<map:call function="foo"> <map:parameter name="bar" value="baz"/> </map:call>
and
function foo() { var x = cocoon.parameters["baz"]; }
It's even easier:
<map:call function="foo"> <map:parameter name="bar" value="baz"/> </map:call>
function foo(bar) { ... }
This syntax turns named parameters in the sitemap into positional parameters of the function. This is likely to cause very confusing bugs when someone considers that sitemap parameters are name value-pairs, which they basically are. Note also that it's the *only* place in the sitemap where parameter order is important.
IMO, the use of cocoon.parameters should be encouraged. Furthermore, cocoon.parameters is the only way to pass sitemap parameters to a continuation.
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
