You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Hubert Trzewik (Prosystel)" <ht...@prosystel.com.pl> on 2004/02/04 19:14:34 UTC
map:parameters problem
I have problem with passing map:parameters into space described as <!-- on
action:set-success -->
Please read my comments in order [[1]], [[2]], [[3]]
Any idea, pls?
<map:resources>
<map:resource name="stage1">
<map:act type="xsp-action" src="act_something.xsp">
<!-- [[3]] I tried to uncomment following line it did not fix
anything -->
<!-- <map:parameter name="myparam" value="{myparam}"/> -->
<!-- on action:set-success -->
<map:call resource="stage2">
<map:parameter name="myparam" value="{myparam}"/>
<!-- [[2]] HERE {myparam} reference DOES NOT WORK -->
</map:call>
</map:act>
<!-- on action:set-failure -->
<!-- [[1]] if I use here {myparam} it works -->
<!-- [[4]] I can always make my action to swap set-success with
set-failure, but it's not good solution (to place code which needs params
here) -->
<map:redirect-to uri="wrong">
</map:resource>
</map:resources>
let's say that "stage2" resource is good working set of generate, transform
and serialize tasks..
and in pipelines also all is correct..
<map:pipelines>
<map:pipeline>
<map:match pattern="this-one">
<map:call resource="stage1">
<!-- and here we set parameter -->
<map:parameter name="myparam" value="123456"/>
</map:call>
</map:match>
</map:pipeline>
</map:pipelines>
--
Hubert Trzewik
Prosystel Sp. z o.o.
hubert.trzewik@prosystel.com.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: map:parameters problem
Posted by "Hubert Trzewik (Prosystel)" <ht...@prosystel.com.pl>.
Yeah, it works. Thanks.
I was conscious <map:act.. is additional level, but I forgot I can use "../"
to address my variables..
--
Hubert Trzewik
Prosystel Sp. z o.o.
hubert.trzewik@prosystel.com.pl
----- Original Message -----
From: "Loic Quintin de Kercadio" <lo...@anyware-tech.com>
To: <us...@cocoon.apache.org>
Sent: Wednesday, February 04, 2004 11:27 PM
Subject: Re: map:parameters problem
> Hi Hubert,
>
> The action (map:act) is a level (it can contain its own parameters) so
> you have to use {../myparam} instead of {myparam} when you're in your
> <map:act>
>
> Loic
>
>
> Hubert Trzewik (Prosystel) wrote:
>
> >I have problem with passing map:parameters into space described as <!--
on
> >action:set-success -->
> >Please read my comments in order [[1]], [[2]], [[3]]
> >Any idea, pls?
> >
> ><map:resources>
> > <map:resource name="stage1">
> > <map:act type="xsp-action" src="act_something.xsp">
> > <!-- [[3]] I tried to uncomment following line it did not
fix
> >anything -->
> > <!-- <map:parameter name="myparam" value="{myparam}"/> -->
> > <!-- on action:set-success -->
> > <map:call resource="stage2">
> > <map:parameter name="myparam" value="{myparam}"/>
> > <!-- [[2]] HERE {myparam} reference DOES NOT
WORK -->
> > </map:call>
> > </map:act>
> > <!-- on action:set-failure -->
> > <!-- [[1]] if I use here {myparam} it works -->
> > <!-- [[4]] I can always make my action to swap set-success with
> >set-failure, but it's not good solution (to place code which needs params
> >here) -->
> > <map:redirect-to uri="wrong">
> > </map:resource>
> ></map:resources>
> >
> >let's say that "stage2" resource is good working set of generate,
transform
> >and serialize tasks..
> >
> >and in pipelines also all is correct..
> >
> ><map:pipelines>
> > <map:pipeline>
> > <map:match pattern="this-one">
> > <map:call resource="stage1">
> > <!-- and here we set parameter -->
> > <map:parameter name="myparam" value="123456"/>
> > </map:call>
> > </map:match>
> > </map:pipeline>
> ></map:pipelines>
> >--
> >Hubert Trzewik
> >Prosystel Sp. z o.o.
> >hubert.trzewik@prosystel.com.pl
> >
> >
> >---------------------------------------------------------------------
> >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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: map:parameters problem
Posted by Loic Quintin de Kercadio <lo...@anyware-tech.com>.
Hi Hubert,
The action (map:act) is a level (it can contain its own parameters) so
you have to use {../myparam} instead of {myparam} when you're in your
<map:act>
Loic
Hubert Trzewik (Prosystel) wrote:
>I have problem with passing map:parameters into space described as <!-- on
>action:set-success -->
>Please read my comments in order [[1]], [[2]], [[3]]
>Any idea, pls?
>
><map:resources>
> <map:resource name="stage1">
> <map:act type="xsp-action" src="act_something.xsp">
> <!-- [[3]] I tried to uncomment following line it did not fix
>anything -->
> <!-- <map:parameter name="myparam" value="{myparam}"/> -->
> <!-- on action:set-success -->
> <map:call resource="stage2">
> <map:parameter name="myparam" value="{myparam}"/>
> <!-- [[2]] HERE {myparam} reference DOES NOT WORK -->
> </map:call>
> </map:act>
> <!-- on action:set-failure -->
> <!-- [[1]] if I use here {myparam} it works -->
> <!-- [[4]] I can always make my action to swap set-success with
>set-failure, but it's not good solution (to place code which needs params
>here) -->
> <map:redirect-to uri="wrong">
> </map:resource>
></map:resources>
>
>let's say that "stage2" resource is good working set of generate, transform
>and serialize tasks..
>
>and in pipelines also all is correct..
>
><map:pipelines>
> <map:pipeline>
> <map:match pattern="this-one">
> <map:call resource="stage1">
> <!-- and here we set parameter -->
> <map:parameter name="myparam" value="123456"/>
> </map:call>
> </map:match>
> </map:pipeline>
></map:pipelines>
>--
>Hubert Trzewik
>Prosystel Sp. z o.o.
>hubert.trzewik@prosystel.com.pl
>
>
>---------------------------------------------------------------------
>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