You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephan Coboos <cr...@gmx.net> on 2003/12/16 15:29:36 UTC

How to passing an param into a resource/action?

Hello,

I have the following resource with an action and call  in it:

<map:resource name="myResource">

    <map:act name="myAction">
       <map:call function="myFunction">
          <!-- myParam is always empty here -->
           <map:parameter name="myParam" value="{myParam}"/>
        </map:call>
    </map:act>

    <!-- Do else here ... -->

</map:resource>

... an I call the resource with a parameter from a pipeline like the 
following example:

<map:match pattern="">
    <map:call resource name="myResource">
       <map:param name="myParam" value="Some value..."/>
    </map:call>
</map:match>

But the parameter myParam is always empty in <map:act/>. Outside the 
block <map:act/> the param myParam exists. What can I do to make the 
param myParam accessible in the <map:call/> block which is in the 
<map:act/> block?

Thank you.

Stephan



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


Re: How to passing an param into a resource/action?

Posted by Jorg Heymans <jh...@domek.be>.
Have a look at thread
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106863428414030&w=2

maybe you need to do something like {../myParam}


Stephan Coboos wrote:

> Hello,
> 
> I have the following resource with an action and call  in it:
> 
> <map:resource name="myResource">
> 
>    <map:act name="myAction">
>       <map:call function="myFunction">
>          <!-- myParam is always empty here -->
>           <map:parameter name="myParam" value="{myParam}"/>
>        </map:call>
>    </map:act>
> 
>    <!-- Do else here ... -->
> 
> </map:resource>
> 
> ... an I call the resource with a parameter from a pipeline like the 
> following example:
> 
> <map:match pattern="">
>    <map:call resource name="myResource">
>       <map:param name="myParam" value="Some value..."/>
>    </map:call>
> </map:match>
> 
> But the parameter myParam is always empty in <map:act/>. Outside the 
> block <map:act/> the param myParam exists. What can I do to make the 
> param myParam accessible in the <map:call/> block which is in the 
> <map:act/> block?
> 
> Thank you.
> 
> Stephan
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

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


RE: How to passing an param into a resource/action?

Posted by Reinhard Poetz <re...@apache.org>.
From: Stephan Coboos

> Hello,
> 
> I have the following resource with an action and call  in it:
> 
> <map:resource name="myResource">
> 
>     <map:act name="myAction">
>        <map:call function="myFunction">
>           <!-- myParam is always empty here -->
>            <map:parameter name="myParam" value="{myParam}"/>
>         </map:call>
>     </map:act>
> 
>     <!-- Do else here ... -->
> 
> </map:resource>
> 
> ... an I call the resource with a parameter from a pipeline like the 
> following example:
> 
> <map:match pattern="">
>     <map:call resource name="myResource">
>        <map:param name="myParam" value="Some value..."/>
>     </map:call>
> </map:match>
> 
> But the parameter myParam is always empty in <map:act/>. Outside the 
> block <map:act/> the param myParam exists. What can I do to make the 
> param myParam accessible in the <map:call/> block which is in the 
> <map:act/> block?

Try {../myParam}

--
Reinhard


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