cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <DPerez...@fcc.es>
Subject **Solved** 2 generators in a request
Date Tue, 02 Dec 2003 15:11:22 GMT
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" <DPerezCar@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


Mime
View raw message