You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Carmona Perez, David" <DP...@fcc.es> on 2003/12/02 16:11:22 UTC
**Solved** 2 generators in a request
Thanks.
Finally a have made a custom action like this:
/**Ejecuta pipeline con efectos secundarios
* @author dperezcar */
public class ExecutePipeline extends AbstractAction {
/** @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters) */
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws MalformedURLException, ParameterException, IOException {
Source fte = resolver.resolveURI(parameters.getParameter("uri"));
try {
fte.getInputStream();
} finally {
resolver.release(fte);
}
return EMPTY_MAP;
}
}
and something like that in the pipeline:
<map:match pattern="chunk/**.html">
<map:act type="ejecuta-pipeline">
<map:parameter name="uri" value="cocoon:/generate-chunks"/>
</map:act>
<map:read src="{0}"/>
</map:match>
--------
David
-----Mensaje original-----
De: Simon Mieth [mailto:simon.mieth@t-online.de]
Enviado el: martes, 02 de diciembre de 2003 12:06
Para: users@cocoon.apache.org
Asunto: Re: 2 generators in a request
On Tue, 2 Dec 2003 11:46:08 +0100
"Carmona Perez, David" <DP...@fcc.es> wrote:
> Hi all,
>
> I'm using DocBook under Cocoon.
>
> In the chunked version of the standard DocBook
> stylesheets, the transformation step generates a set of
> files..
>
> <map match="**.html">
> <map:generate src="my-source.xml">
> <!-This steps generates in myTempDirectory/ the chunks-->
> <map:transform src="html/chunk.xsl">
> <map:parameter name="base.dir" value="myTempDirectory/"/>
> </map:transform>
> <map:generate src="myTempDirectory/{0}">
> <map:serialize/>
> </map match>
>
> I know I can't do that because I can generate twice.
>
> Any suggestion will be welcome.
>
> --------
> David
>
>
Hi,
maybe the CInclude-Transformer can do this job.
look at
http://cocoon.apache.org/2.1/userdocs/transformers/cinclude-transformer.html
Best regards,
Simon
---------------------------------------------------------------------
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
Re: **Solved** 2 generators in a request
Posted by Andrzej Jan Taramina <an...@chaeron.com>.
Carmona:
> Finally a have made a custom action like this:
>
> public class ExecutePipeline extends AbstractAction {
Why didn't you just use the ResourceLoadAction that was posted to the bug
list and this mail list some time ago?
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org