cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boisvert, Eric" <>
Subject RE: IncludeTransformer
Date Thu, 17 Jan 2008 15:06:03 GMT

Yet another approach is to use STX.   

STX processor in cocoon is Joost ( which implements external-filter
, one of which is POST (maybe you'll have to update the .jar to the most recent version, it's
painless, just stop tomcat/cocoon, remove the old jar and replace with the new one, and restart).

The joost documentation says (from the web site):

] Using external SAX2 filters

] Joost implements the usage of external SAX2 filters as described in the WD of the STX specification
section 4.19 (CVS version Jul 23 
] 2003). Joost uses the TrAX API to instantiate an XSLT transformer object. The actual XSLT
implementation (i.e. the 
] javax.xml.transform.TransformerFactory) to be used may be controlled by setting the property

] net.sf.joost.trax.TrAXConstants.KEY_XSLT_FACTORY, either as a system property or using TransformerFactory.setAttribute.

] Besides the XSLT ( and STX (
filter methods, Joost provides 
] built-in implementations for the following two additional values of the filter-method attribute:

(blah blah..)

**]     Sends the filter input data per HTTP-POST request to the URL specified in the required
target parameter (i.e. <stx:param 
**] name="target" ... >). The data of the HTTP response are the result of this filter.
The HTTP-POST filter can be used to access web 
**] services from STX.

I never try, but I will shortly (like.. Today) for exactly the same reasons Sébastien (to
fetch data from a remote WFS).  STX is a bit more tricky that XSLT but in a simple series
of WFS calls, it should be quite obvious.  The great benefit of STX is that it's SAX driven
(so I don't expect it should build a big buffer - GML documents tends to be quite large)

Wish me the best.


-----Message d'origine-----
De : Sébastien Geindre [] 
Envoyé : 17 janvier 2008 05:03
À :
Objet : Re: IncludeTransformer

>> Second approach : use transformer given by franco 
>> (, 
>> but it seems to not be compatible with C2.2.
>> public class HTTPPostTransformer
>>        extends AbstractTransformer
>>        implements Recyclable, Composable { ...
>> this transformer, written for C2.1, is based on AbstractTransformer.
>> it has compose method which set the manager.
>> Does it still work in C2.2 ?
> I think it should work as long as you replace Composable with 
> Serviceable interface and compose() with service() method. However, if 
> you write your own components from scratch I would suggest to write them as Spring beans
instead of Avalon components.
implements Serviceable make it works...
I am not used with Spring beans... any cocoon links to how make a cocoon transformer based
on spring beans ?
thanks again Grzegorz!

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

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

View raw message