cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <>
Subject Re: migrating to cocoon 3.0
Date Mon, 28 Jan 2013 08:21:48 GMT
Hi Mansour,
you'll find my replies embedded below.


On 28/01/2013 03:07, Mansour Al Akeel wrote:
> To be more specific, where can I find examples for SAX components. For example:
> looking at this
> I don't understand the parameters for :
> void setup(Map<String,Object> parameters)
>      The shared object map for this pipeline run.
> and for:
> void setConfiguration(Map<String,? extends Object> configuration)

Take a look at interface eventually implemented by AbstractSAXGenerator, 
i.e. PipelineComponent:

Don't forget that "Apache Cocoon 3 is a major rewrite of Cocoon 2.2. 
Like Cocoon 2 it is based around the concept of pipelines and sitemaps 
and it is very similar to Cocoon 2.2 in many respects but is slimmed 
down and designed to be easily used with Java code (= no frameworks 

This has many consequences, including the fact that everything that you 
do in C2.1 and C2.2 via sitemap.xmap can be done via pure Java code: 
here's the reason why there are two different setup() and 
setConfiguration() methods, even though very often they can be 
considered almost equivalent.

> additionally, in previous versions of cocoon, I was able to do this
> for custom components:
>    <map:components>
>      <map:generators/>
>      <map:transformers/>
>      <map:serializers/>
>      <map:readers/>
>      <map:selectors/>
>      <map:matchers/>
>      <map:actions/>
>      <map:pipes/>
>    </map:components>
> Is this still possible in C3.0 ??

Of course yes, but not in the sitemap.xmap.
The availability of generators, transformer, etc is handled by Spring 
via the cocoon-spring-configurator.

For example, the "standard" components are declared in [7] while 
optional are declared in [8].
You can of course declare your own components in your own sources: 
consider for example what I did for a project of mine [9] where I have 
developed a reader and a transformer for Hippo CMS.

> On Mon, Jan 28, 2013 at 1:12 AM, Mansour Al Akeel
> <> wrote:
>> I have few components written against cocoon 2.2.
>> For example, extending those classes:
>> FileGenerator

This is now a subclass of XMLGenerator: you will find it in [1].

>> TraxTransformer

It is now called XSLTTransformer (easier, isn't it?); you will find it 
in [2].

>> AbstractInputModule

There is no support for input modules in C3 sitemap.
However, there is a similar concept, i.e. language interpreters [3]; 
currently, there are some of there available: JEXL [4], Settings [5] and 
so on.

You can see them in action in cocoon-sample sitemap [6] (for example in 
things like {jexl:cocoon.request.fileName}).

>> I am looking to port them to 3.0, but can not find a reference for the
>> components. I can see here some components, but no examples and not
>> even the classes.
>> Is there a place where I can get the help I need ??

Oh yes, this mailing list ;-)


Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member

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

View raw message