cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert" <>
Subject AW: How to define custom parameter for map:serialize?
Date Fri, 08 Mar 2002 14:59:07 GMT


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

The problem is we have written a "template-based" serializer. The
pipeline generates the data, and the serializer uses the template and
the date to produce the output. The template is unfortunately not in
XML-Format, so it cannot be processed in the pipeline. Instead the
template filename should be passed as parameter to the serializer.

If caching is the only reason for not being able to allow
pipeline-dependent parameters - in this case it would be simple to not
use the caching (i.e. do not implementing the Cachable-Interface) for
this special serializer and there should be no problem with caching.

In the existing C2 architecture the lack of pipeline-dependent
parameters is quite limiting.

Now the only solution is to put the template parameter in the XML stream
to "parameterize" the serializer (but this is mixing of content and
formatting information) or to fix it in the serializer definition and
duplicate the serializer for each different parameter which is even
worse (and it would be not possible to get the parameter definition from
a database or other source).

Patching cocoon for our needs in this case is no option either, because
this would change interfaces "in the heart" of the pipeline processing
and we would not be able to upgrade to future cocoon-versions without

I think a lot of other serializers would benefit from pipeline-dependent
parameters, too, i.e. the compressing factor/background color of the svg
serializer or the doctype of the HTML serializer (just think of the
problems of some Netcape 6 version with some special doctype


Please check that your question has not already been answered in the
FAQ before posting. <>

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

View raw message