cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: xml -> binary formatting
Date Wed, 15 Mar 2000 11:31:04 GMT
John Carroll wrote:
> 
> Hi,
> 
> does anyone have experience of using cocoon to turn an xml doxument into a
> binary object such as an image. I am attempting this by having a
> formatter convert an svg xml file into a png image which should
> be displayed in the browser.
> 
> At the moment the image sent back is being interpreted as text/html
> due to the MIME type header being sent back (even though within my
> formatter class I set the getMIMEType() method to return 'image/png)'.
> 
> I am sending the image back by extracting the HttpResponse object from
> the Dictionary passed to my formatter and getting an OutputStream
> from the HttpResponse object. Is there a simpler way within cocoon to
> send binary data with the correct MIME header to the browser?

For Cocoon 1.x, writer your own formatter

For Cocoon2, you will be able to specify what MIME type your pipeline
outputs (or something like that, we still have to figure it out, but we
are aware of this problem)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message