cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <>
Subject Re: New Serialise Type
Date Thu, 07 Dec 2000 14:40:12 GMT
----- Original Message ----- 
From: "Morrison, John" <>
To: <>
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"/>

View raw message