cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert" <sseif...@pro-vision.de>
Subject AW: How to define custom parameter for map:serialize?
Date Fri, 08 Mar 2002 15:32:09 GMT
No, output ist RTF. No, before you ask: we cannot use FOP and the
builtin RTF Serializer because we have some special requirements not
supported by FOP (i.e. automatic line numbering which is supported by
Word/RTF, but not in FOP).

Seeing your answers i'm thinking about another way, that seems quite
hacked for me: Writing a transformer that uses the incoming data and our
Template, puts all generated RTF in one huge single XML Element and  a
custom serializer "serializes" this without changes as text output.

Is this the cleanest solution in Cocoon??

Stefan

> -----Ursprüngliche Nachricht-----
> Von: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> Gesendet: Freitag, 8. März 2002 16:17
> An: cocoon-users@xml.apache.org
> Betreff: RE: How to define custom parameter for map:serialize?
> 
> 
> > From: Stefan Seifert [mailto:sseifert@pro-vision.de]
> > 
> > <snip/>
> > 
> > > 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.
> > 
> > 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.
> 
> Is output in XML format? (HTML?). If yes, than your serializer is
> perfect candidate for transformer.
> 
> 
> > The template is unfortunately not in
> > XML-Format, so it cannot be processed in the pipeline.
> 
> It is Ok, it is not required to be XML (see above).
> 
> 
> > 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.
> 
> You can try and open the discussion on the dev list.
> 
> 
>  
> > 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).
> 
> Or to write a transformer. Clean and (btw) cacheable solution.
> 
>  
> > 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
> > problems.
> > 
> > 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
> > definitions).
> > 
> > Stefan

---------------------------------------------------------------------
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