cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Daniel <alexander.dan...@gmx.at>
Subject Re: action for each request
Date Mon, 29 Sep 2008 11:22:12 GMT
On 29.09.2008, at 10:31, Varga Zsombor wrote:

> Hi!
>
> I'd like to run an action before every request, and after it use
> matchers to decide what to happen. For example:
>
>
> <map match pattern="a.html">
>  <map:generate type="serverpages" src="AA.xsp">
>  <map:transform src="XXX.xsl"/>
>  <map:serialize/>
> </map:match>
>
> <map match pattern="b.html">
>  <map:generate src="b.xml">
>  <map:transform src="YYY.xsl"/>
>  <map:serialize/>
> </map:match>
>
> <map:match pattern="*">
>  <map:act type="my-action">
>    <???????>
>  </map:act>
>  <map:serialize/>
> </map:match>
>

You could use sub-matchers:

<map:match pattern="*">
	<map:act type="my-action">
		
		<map:match pattern="a.html">
			<map:generate type="serverpages" src="AA.xsp"/>
			<map:transform src="XXX.xsl"/>
		</map:match>
		
		<map:match pattern="b.html">
			<map:generate src="b.xml"/>
			<map:transform src="YYY.xsl"/>
		</map:match>
		
	</map:act>
	<map:serialize/>
</map:match>

Alex

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


Mime
View raw message