cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: [C2] How to pass parameter from Act to XPS?
Date Wed, 10 Oct 2001 07:34:26 GMT
On 09.Oct.2001 -- 09:46 AM, Eduardo Godoy Vega wrote:
> Hi,
> 	I wrote an Action class and I want to pass some parameter from the Action
> to some XPS ...
> How can I do it?
> <map:match pattern="process-unveil">
> <map:act type="unveil-it" >
> </map:act>
> <map:generate type="serverpages" src="do_unveil.xsp"/>
> <map:transform src="stylesheets/llbean-html.xsl"/>
> <map:serialize/>
> </map:match>

Um, this won't work because the return value of an action is only
visible for the descendant::* axis which is emtpy in your example (see
TFM sect. Actions for more). If your action never fails i.e. never
returns "null" you could move the rest of your subpipeline inside the
action tag. Otherwise you'd need to have a success branch and a
failure one.

In addition you'll need to pass the desired parameter to your xsp by
augmenting the <map:generate/> tag with a <map:parameter
name="parameter_name_in_xsp" value="{parameter_name_from_action}"/>
child element.

The xsp can then access this parameter through the parameters object.

> My Action, just take a value from request (String) and return the same
> string (but in UpperCap) ... and I want that do_unveil.xps show the UpperCap
> String ...

There might be an action supplied with cocoon that does just that
(apart from the upper case part).


C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message