Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 70749 invoked by uid 500); 8 Mar 2002 15:50:22 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 70738 invoked from network); 8 Mar 2002 15:50:21 -0000 From: "Vadim Gritsenko" To: Cc: "'Stefan Seifert'" Subject: FW: How to define custom parameter for map:serialize? Date: Fri, 8 Mar 2002 10:49:51 -0500 Message-ID: <01b101c1c6b8$e4ef88b0$0a00a8c0@vgritsenkopc> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Cocoon Devs, Can somebody recommend the best way to deal with the issue? The problem is that does not allow parameters and the question is how to live without it. See corresponding thread on the user list. Should we add support for cache-aware serializers implementing SitemapModelComponent? Thanks, Vadim > -----Original Message----- > From: Stefan Seifert [mailto:sseifert@pro-vision.de] > Sent: Friday, March 08, 2002 10:32 AM > To: cocoon-users@xml.apache.org > Subject: AW: How to define custom parameter for map:serialize? >=20 > 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). >=20 > 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. >=20 > Is this the cleanest solution in Cocoon?? >=20 > Stefan >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net] > > Gesendet: Freitag, 8. M=E4rz 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] > > > > > > > > > > > > > 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=20 > > > of content and formatting information) or to fix it in the=20 > > > 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=20 > > > 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=20 > > > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org