cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2] Actions Purpose and Use
Date Tue, 13 Feb 2001 08:13:07 GMT
Klaus Drechsler wrote:
> Hi,
> > > You just raised another issue, one that I haven't seen referenced, but
> > > looks very interesting:
> > >
> > >     <map:act type="screen-navigator"     src="{1}"/>
> >
> >It's the source parameter to the act method.
> Could you please explain this in more detail?
> What is the {1} substituted with?

Ok, it wasn't very clear. The sample I've used was

  <map:action-set name="shop-actions">
   <map:act type="session-invalidator"  action="logoff"/>
   <map:act type="session-validator"/>
   <map:act type="cart-add"             action="addItem"/>
   <map:act type="cart-remove"          action="removeItem"/>
   <map:act type="cart-remove-all"      action="removeAll"/>
   <map:act type="cart-update"          action="updateQty"/>
   <map:act type="order-add"            action="addOrder"/>
   <map:act type="order-verify"         action="verifyOrder"/>
   <map:act type="screen-navigator"     src="{1}"/>

And this is a possible pipeline snipped which uses this action set:

   <map:match pattern="*">
    <map:act set="my-actions">     <--- HERE
     <map:generate  type="serverpages" src="docs/xsp/{nextpage}.xsp"/>
     <map:transform src="stylesheets/page2html.xsl"/>
     <map:serialize type="html"/>

The <map:act set="my-actions"> acts as a single element in the pipeline. So 
it has access to the nearest parent <map:match pattern="*"> element here 
which extracted something out of the URI. That extracted piece is what the 
{1} in the src attribute will refer to. Is that clear now?


View raw message