You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ron van de Ven <Ro...@mp-objects.com> on 2005/07/25 10:48:29 UTC

csp transformer

Hi,
 
I've been using for quite some time now. When studying the transformers I
see the same pattern 
coming back; the transformers look for a certain element name, and on the
position of the element 
name insert xml. 
Isn't it therefore a good idea, to make a CocoonServerPagesTransformer.
This CSPTransformer looks up a cld.xml file. The cld file contains a mapping

of element name to XmlPipe implementation. The CSPTransformer filters for 
the cld.xml element names and when finding one
instantiates the XmlPipe implementation, and invokes it's xmlGenerate()
method. 
The advantage of this approach is that it's much easier for developers not
so 
familier with cocoon, to extend cocoon transformes. It also prevents from
having the performance overhead
of having to use an extra transformer when you just need a small extension
to an already 
existing transformer. 
What do you think?
 
Regards,    Ron van de Ven
 
 

RE: csp transformer

Posted by Ron van de Ven <Ro...@mp-objects.com>.
Hi,

Yes, that's what I intended.
Is there anymore documentation then the normal amount of documentation?
Is there a plan to rewrite some transformers with this transformer as it's
base?
(E.g. the jx-template transformer).

Regards,    Ron
 

-----Original Message-----
From: Vadim Gritsenko [mailto:vadim@reverycodes.com] 
Sent: maandag 25 juli 2005 14:36
To: dev@cocoon.apache.org
Subject: Re: csp transformer

Ron van de Ven wrote:
> Hi,
>  
> I've been using for quite some time now. When studying the 
> transformers I see the same pattern coming back; the transformers look 
> for a certain element name, and on the position of the element name 
> insert xml.
> Isn't it therefore a good idea, to make a CocoonServerPagesTransformer.
> This CSPTransformer looks up a cld.xml file. The cld file contains a 
> mapping of element name to XmlPipe implementation. The CSPTransformer 
> filters for the cld.xml element names and when finding one 
> instantiates the XmlPipe implementation, and invokes it's 
> xmlGenerate() method.
> The advantage of this approach is that it's much easier for developers 
> not so familier with cocoon, to extend cocoon transformes. It also 
> prevents from having the performance overhead of having to use an 
> extra transformer when you just need a small extension to an already 
> existing transformer.
> What do you think?

Take a look at the taglib block, TagTransformer.

Vadim


Re: csp transformer

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Ron van de Ven wrote:
> Hi,
>  
> I've been using for quite some time now. When studying the transformers 
> I see the same pattern
> coming back; the transformers look for a certain element name, and on 
> the position of the element
> name insert xml.
> Isn't it therefore a good idea, to make a CocoonServerPagesTransformer.
> This CSPTransformer looks up a cld.xml file. The cld file contains a 
> mapping
> of element name to XmlPipe implementation. The CSPTransformer filters for
> the cld.xml element names and when finding one
> instantiates the XmlPipe implementation, and invokes it's xmlGenerate()
> method.
> The advantage of this approach is that it's much easier for developers 
> not so
> familier with cocoon, to extend cocoon transformes. It also prevents 
> from having the performance overhead
> of having to use an extra transformer when you just need a small 
> extension to an already
> existing transformer.
> What do you think?

Take a look at the taglib block, TagTransformer.

Vadim