cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huber, Daniel" <Daniel.Hu...@TechniDATA.DE>
Subject RE: Custom transformer - ho to get in / out Document from previous ransfromations
Date Thu, 09 Sep 2004 14:18:09 GMT
> I am writing a custom transformer that needs to extract
> some fragments from previous transformation steps in the
> running pipeline. Does anyone know how to access, from a
> sitemap component, the input / output to the transform
> method of the transformers that were applied before?

Hi Javier,

You can't access the I/O streams with a transformer directly.
A transformer won't get the complete document from its predecessor
component. It will rather get SAX events. Your component then can
manipulate the data of these events before passing them on to the next

More concrete this means:

Extend the class org.apache.cocoon.transformation.AbstractTransformer
Override the method of the inherited Interface
Manipulate the incoming data and pass it then to the
super-implementation of AbstractTransformer.

The interface ContentHandler provides methods like startElement(),
endElement(), characters(), which corresponds to the opening tag,
closing tag and text node of an XML element.

For a complete list of available methods, please see



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

View raw message