You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <u....@cbim.it> on 2003/01/08 22:00:34 UTC

[Flow] Passing values from the sitemap to the flow

Parameters passed from the sitemap to the flow functions are not 
strings. Here's an example:

<map:match pattern="test">
   <map:call function="test">
     <map:parameter name="param" value="testval"/>
   </map:call>
</map:match>

function test(param) {
   if (param == "testval") { /* THIS TEST FAILS! */ }
   if ("" + param == "testval") { /* THIS TEST SUCCEEDS! */ }
}

MHO is that sitemap parameters should be converted to strings before 
being passed to the flow. What do you think?

	Ugo

-- 
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org