You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ben Anderson <be...@gmail.com> on 2004/12/15 14:31:46 UTC
act: hiding {1}
Hi,
I'm trying to use the RequestParamAction, but when I do so, it blocks
use of my normal {1} variable? Is there a way around this? Below is
my sitemap excerpt. The first {1} works fine, but the second one does
not. Is there a way to get at the {1} variable inside from within
this <map:act>?
<map:match pattern="ws/*">
<map:generate type="request"/>
<map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:transform type="myTransformer">
<map:parameter name="fileName"
value="mldm/xml/stubs/afterTransformer/{1}-{format}.xml"/>
</map:transform>
Thanks,
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: act: hiding {1}
Posted by Jorg Heymans <jh...@domek.be>.
<sigh>
ignore this, i meant ofcourse {../1} as Irv already pointed out
</sigh>
Jorg Heymans wrote:
> ../{1} IIRC
>
> Ben Anderson wrote:
>
>> Hi,
>> I'm trying to use the RequestParamAction, but when I do so, it blocks
>> use of my normal {1} variable? Is there a way around this? Below is
>> my sitemap excerpt. The first {1} works fine, but the second one does
>> not. Is there a way to get at the {1} variable inside from within
>> this <map:act>?
>>
>> <map:match pattern="ws/*">
>> <map:generate type="request"/>
>> <map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
>> <map:act type="request">
>> <map:parameter name="parameters" value="true"/>
>> <map:transform type="myTransformer">
>> <map:parameter name="fileName"
>> value="mldm/xml/stubs/afterTransformer/{1}-{format}.xml"/>
>> </map:transform>
>>
>> Thanks,
>> Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: act: hiding {1}
Posted by Jorg Heymans <jh...@domek.be>.
Dan Durkin wrote:
> Is the use of the RequestParameterModule the new preferred way of doing
> this?
>
> In this case having a sitemap fragment like:
>
> <map:match pattern="ws/*">
> <map:generate type="request"/>
> <map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
> <map:transform type="myTransformer">
> <map:parameter name="fileName"
> value="mldm/xml/stubs/afterTransformer/{1}-{request-param:format}.xml"/>
> </map:transform>
>
But ofcourse :) I completely ignored what Ben actually tried to do and
instead focussed on giving him the wrong answer :)
You're right, the requestparam module is a much more elegant way of
doing this (as a matter of fact i didn't even know there was an action
for it as well!).
Thanks for pointing this out Dan.
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: act: hiding {1}
Posted by Dan Durkin <dd...@scilearn.com>.
Leszek Gawron wrote:
> Jorg Heymans wrote:
>
>> ../{1} IIRC
>
> {../1}
>
Is the use of the RequestParameterModule the new preferred way of doing
this?
In this case having a sitemap fragment like:
<map:match pattern="ws/*">
<map:generate type="request"/>
<map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
<map:transform type="myTransformer">
<map:parameter name="fileName"
value="mldm/xml/stubs/afterTransformer/{1}-{request-param:format}.xml"/>
</map:transform>
This eliminates the context switching {../1}
WDYT?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: act: hiding {1}
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Jorg Heymans wrote:
> ../{1} IIRC
{../1}
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: act: hiding {1}
Posted by Jorg Heymans <jh...@domek.be>.
../{1} IIRC
Ben Anderson wrote:
> Hi,
> I'm trying to use the RequestParamAction, but when I do so, it blocks
> use of my normal {1} variable? Is there a way around this? Below is
> my sitemap excerpt. The first {1} works fine, but the second one does
> not. Is there a way to get at the {1} variable inside from within
> this <map:act>?
>
> <map:match pattern="ws/*">
> <map:generate type="request"/>
> <map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
> <map:act type="request">
> <map:parameter name="parameters" value="true"/>
> <map:transform type="myTransformer">
> <map:parameter name="fileName"
> value="mldm/xml/stubs/afterTransformer/{1}-{format}.xml"/>
> </map:transform>
>
> Thanks,
> Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [Cocoon-Users] act: hiding {1}
Posted by Irv Salisbury III <ir...@dotech.com>.
Ben, you need to use {../1}. When you are inside an action, the
"context" of the {} is the action itself. To get to the parent
"context", you need to use ..
Irv
Ben Anderson wrote:
>Hi,
>I'm trying to use the RequestParamAction, but when I do so, it blocks
>use of my normal {1} variable? Is there a way around this? Below is
>my sitemap excerpt. The first {1} works fine, but the second one does
>not. Is there a way to get at the {1} variable inside from within
>this <map:act>?
>
><map:match pattern="ws/*">
> <map:generate type="request"/>
> <map:transform src="xslt/ws/{1}-setup.xsl" label="setup"/>
> <map:act type="request">
> <map:parameter name="parameters" value="true"/>
> <map:transform type="myTransformer">
> <map:parameter name="fileName"
>value="mldm/xml/stubs/afterTransformer/{1}-{format}.xml"/>
> </map:transform>
>
>Thanks,
>Ben
>
>---------------------------------------------------------------------
>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