cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Writing a Transformer, getting a Serializer
Date Mon, 03 Dec 2001 11:37:08 GMT
At 10:49 am +0000 2/12/01, Jeremy Quinn wrote:

>Maybe I'll have a go at writing a test "FileResourceWriterTransformer", to
>investigate the process of taking input from the user, having it modify a
>Resource using XSLT then writing it out again.

Would someone mind helping me with some Cocoon internals?

I am pretty sure I know how to write a Transformer (at least I have some
great examples!), but I do not know how to get a Serialiser inside a

What I am thinking of is this:

I would like to pass as a parameter to the Transformer, the name of the
Serialiser (as set up in the SiteMap), that you want the Transformer to use
when it writes out your XML Fragment to file.

Something like this:

  <map:transformers default="xslt">
      pool-max="16" pool-min="8" pool-grow="2">
    	<serializer>xml</serializer> <!-- say which Serialiser to use -->

  <map:serializers default="html">
   	<map:serializer name="xml"
      pool-max="32" pool-min="16" pool-grow="4">

		<map:match pattern=" ... ">
				<map:generate ...../>

				<map:transform type="write-file" src="cocoon:/thefile.xml">
					<!-- the Node in the current document, that is
						to become the root Node of the saved file-->
					<map:parameter name="file-root" value="doc"/>


Then in the "compose()" method, I want to take the (SiteMap) name of the
Serialser, and retrieve the Component, releasing it in the "dispose()"

Is this possible?
Am I looking at this the right way?

Thanks for any help

regards Jeremy


   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <>     		 <>
   <phone:+44.[0].20.7737.6831>             <>

To unsubscribe, e-mail:
For additional commands, email:

View raw message