cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: [C2] SVG Serializer
Date Wed, 30 Aug 2000 07:27:53 GMT

--- Ross Burton <ross.burton@mail.com> wrote:
> Hi,
> 
> I (hopefully) have just committed a new serializer, the latest
> libraries,
> and example and support code for SVG files.
> 
> How To Use It:
> 
> The easiest way is to put jai_codec.jar from JAI (see java.sun.com)
> in your
> classpath, uncomment the commented sections in sitemap.xmap, and
> build
> Cocoon 2.  Look at /welcome and follow the SVG links.
> 
> Image encoders are built if the required classes are available, Sun
> JDKs
> should build JPEGEncoder, if you have JAI installed JAIPNGEncoder and
> JAIJPEGEncoder should be built.  Image encoders are referenced in
> cocoon.xconf as a normal component.
> 
> Summary of New Stuff:
> 
> * Image encoder components (org.apache.cocoon.components.image.*)
> which take
> a BufferedImage and write it out to a OutputStream.  Currently
> implemented
> are JPEG and PNG encoders using Java Advanced Imaging, a PNG encoder
> using
> the LGPL PngEncoder package, and a JPEG encoder using Sun's built-in
> codec.
> * Configurable SVG serialization.  Select your output format (using a
> image
> encoder), if the image should be transparent and if not, what colour
> to have
> as a background.
> * A nice example of a SVG.
> 
> The code is not final as the sitemap has been changing so often and I
> have
> been so busy, you're lucky it compiles.  I'm finishing the code asap.

I tried it yesterday and it compiles :)

> 
> What Needs To Be Done:
> 
> * Docs, docs and more docs.
> * Fix a bug in Cocoon/Xerces regarding files with DTDs.  I can't seem
> to get
> SVG with attached DTDs (stored locally) to parse.
> * Optimise the Image Encoders and serializer compositing.  I'm not
> too hot
> with the Java2D library, and it shows.  If anyone is a guru with
> BufferedImages and compositing, could you look at the code?
> * Allow the serializer configuration to be overridden in the
> pipelines.
> * Repackage the SVG libraries (there is four of them for some unknown
> reason) - should be easy.
> * Bring the configuration interface up to line with the sitemap WD.
> * Ensure that the mime-type is as intelligent as possible - the
> encoder
> knows the mime type if it is not specified in the sitemap.

The mime type obtained from the serializers getMimeType() method has
always precedence over the one specified in the sitemap.

> I know this list of "features" is rather long but I though I'll get
> the code
> into the tree so people can comment on it ("hey, you broke Cocoon
> 2!") and
> see what I was doing.

Your sample with the SVGSerializer worked for me. Only the hello.svg
sample throwed me an Exception (I think because the SVGTransformer is
alpha code :)

> There is a SVGTransformer in alpha as well (for manipulating SVG
> documents
> in the pipeline), when Ricardo (hint hint) commits the amazing
> XSP-as-a-filter code he claimed to have, I'll port it to a XSP
> filter.

Keep up the good work.

Giacomo

=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message