You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Morrison, John" <Jo...@uk.experian.com> on 2000/12/07 14:08:59 UTC

New Serialise Type

Hi all,

I'm trying to dynamically create CSS and I want to serialise this as:

<map:serializer name="css"    mime-type="text/plain"
src="org.apache.cocoon.serialization.TextSerializer"/>

Do I need to do anything else?

John Morrison


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

[C2]: Patch for poolable FOPSerializer

Posted by Carsten Ziegeler <cz...@sundn.de>.
Hello,

attached is a patch for the FOPSerializer which makes it poolable. 
It also fixes a hook memory leak, as the old FOPSerializer was never 
removed from the MessageHandler listener list.

I would also suggest to update to fop version to 0.15 as besides
some other improvements the memory usage is much smaller.

Regards
Carsten Ziegeler

Open Source Group              sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                           mailto:cziegeler@sundn.de 
================================================================

Re: New Serialise Type

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Morrison, John" <Jo...@uk.experian.com>
To: <co...@xml.apache.org>
Sent: Thursday, December 07, 2000 8:08 AM
Subject: New Serialise Type


> Hi all,
> 
> I'm trying to dynamically create CSS and I want to serialise this as:
> 
> <map:serializer name="css"    mime-type="text/plain"
> src="org.apache.cocoon.serialization.TextSerializer"/>
> 
> Do I need to do anything else?

Nope.  But the proper mime-type is "text/css".
I created an entry like this:

<map:serializer name="text" src="org.apache.cocoon.serialization.TextSerializer"/>

so that I can use the one serializer for multiple mime
types.  For example, I want to dynamically create a
javascript file that is associated with a form (so I can
take advantage of browser caching and only need to maintain
one XML file):

<map:match uri="form/*.js">
  <map:generator href="docs/forms/{1}"/>
  <map:translate href="style/forms/xml2js"/>
  <map:serialize type="text" mime-type="application/x-javascript"/>
</map:match>