cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: How to define custom parameter for map:serialize?
Date Fri, 08 Mar 2002 14:36:01 GMT
> From: Matthieu BenŠ¹teau [mailto:m.beneteau@quaternove.fr]
> 
> Hi Stefan,
> 
> > We have written a custom serializer and want to specify a custom
> > parameter in the sitemap pipeline, not in serializer definition.
> >
> > This works
> >
> >   <map:serializers>
> >     <map:serializer name="serializerxyz" mime-type="..."
logger="..."
> > src="...">
> > 	<parameter name="param1" value="xyz"/>
> >     </map:serializer>
> >   </map:serializers>
> >
> > but the parameter is fixed for the whole sitemap.
> 
> This works because most serializers implement the
> org.apache.avalon.framework.configuration.Configurable
> interface, which defines a "configure()" method.
> 
> > But we want to define the parameter in the pipeline like:
> >
> >     <map:match pattern="...">
> >       ...
> >       <map:serialize type="serializerxyz">
> >         <parameter name="param1" value="xyz"/>
> >       </map:serialize>
> >     </map:match>
> >
> > How ist this possible? We found no fitting interface to accomplish
this
> > (SitemapOutputComponent does not define a "setup"-Method like
> > OutputModelComponent).
> 
> This is currently not possible in cocoon 2.0.1 because serializers do
not
> implement the
> org.apache.cocoon.sitemap.SitemapModelComponent
> interface (this interface defines a "setup()" method).
> 
> I don't know whether this behaviour will be available in a future
release.
> Does anyone know?

This was discussed several times and the result is: "serializers must be
unaware of environment they running in and always produce same response
independent of environment state". IIRC, this has to do with the
caching. Implement custom transformer if you want, it can have
parameters.

Vadim
 
> 
> Matthieu
> 
> 


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message