You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Wilder-Smith <ch...@wilder-smith.org> on 2003/10/07 18:01:34 UTC

Pipeline execution nonsequential?

Hi,

I've got a requirement that I thought could be filled very easily by a
custom action.  Basically I need to set some request parameters and some
sitemap parameters before the transformers start to transform, but after
the generator.  So, I've got a sitemap snippet that looks like this:

<map:match pattern="passage/*">
  <map:generate src="{0} type="dom">
    <map:parameter name="config-file" value="configuration.xml"/>
  </map:generate>
  <map:act type="style-selection">
    <map:transform src="stylesheets/{xsl-src}/>
  </map:act>
  <map:serialize type="html"/>
</map:match>

I've got debug logging in the custom generator as well as in the action
and it appears that the action is executed before generator.  Is
something going awry here, or do I have a basic misunderstanding of how
things are supposed to proceed.  My fallback is to do the work now being
done in the action in a transformer, but the action approach seemed to
be more appropriate.

Any thoughts?

Thanks

Chris



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


Re: Pipeline execution nonsequential?

Posted by Geoff Howard <co...@leverageweb.com>.
Chris Wilder-Smith wrote:
> Hi,
> 
> I've got a requirement that I thought could be filled very easily by a
> custom action.  Basically I need to set some request parameters and some
> sitemap parameters before the transformers start to transform, but after
> the generator.  So, I've got a sitemap snippet that looks like this:
> 
> <map:match pattern="passage/*">
>   <map:generate src="{0} type="dom">
>     <map:parameter name="config-file" value="configuration.xml"/>
>   </map:generate>
>   <map:act type="style-selection">
>     <map:transform src="stylesheets/{xsl-src}/>
>   </map:act>
>   <map:serialize type="html"/>
> </map:match>
> 
> I've got debug logging in the custom generator as well as in the action
> and it appears that the action is executed before generator.  Is
> something going awry here, or do I have a basic misunderstanding of how
> things are supposed to proceed.  My fallback is to do the work now being
> done in the action in a transformer, but the action approach seemed to
> be more appropriate.

<map:match pattern="passage/*">
   <map:act type="style-selection">
     <map:generate src="{0} type="dom">
       <map:parameter name="config-file" value="configuration.xml"/>
     </map:generate>
     <map:transform src="stylesheets/{xsl-src}/>
     <map:serialize type="html"/>
   </map:act>
</map:match>

(this will give a 404 if your action ever fails)


Geoff


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


RE: Pipeline execution nonsequential?

Posted by Francis Vermeulen <fv...@ezgov.com>.
Hi Chris,

the behaviour that you observe is intended Cocoon behaviour. The sitemap
will always execute actions in a sitemap definition first and depending on
what the action returns, execute or not the enclosed sitemap items: if the
action returns a non-null object, the enclosed items (typically a standard
pipeline) are executed. If it returns null, the next level items in the
sitemap are executed. So in order to achieve what you want, you either need
to set the parameters in your Action or write a custom generator.

Regards,
Francis

-----Original Message-----
From: Chris Wilder-Smith [mailto:chris@wilder-smith.org]
Sent: Tuesday, October 07, 2003 6:02 PM
To: users@cocoon.apache.org
Subject: Pipeline execution nonsequential?


Hi,

I've got a requirement that I thought could be filled very easily by a
custom action.  Basically I need to set some request parameters and some
sitemap parameters before the transformers start to transform, but after
the generator.  So, I've got a sitemap snippet that looks like this:

<map:match pattern="passage/*">
  <map:generate src="{0} type="dom">
    <map:parameter name="config-file" value="configuration.xml"/>
  </map:generate>
  <map:act type="style-selection">
    <map:transform src="stylesheets/{xsl-src}/>
  </map:act>
  <map:serialize type="html"/>
</map:match>

I've got debug logging in the custom generator as well as in the action
and it appears that the action is executed before generator.  Is
something going awry here, or do I have a basic misunderstanding of how
things are supposed to proceed.  My fallback is to do the work now being
done in the action in a transformer, but the action approach seemed to
be more appropriate.

Any thoughts?

Thanks

Chris



---------------------------------------------------------------------
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