cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Burton <r...@itzinteractive.com>
Subject [C2] Updated SVG Serializer
Date Wed, 21 Feb 2001 23:55:47 GMT
Hi,

I'm currently trying to convince my dialup connection to say connected to
xml.apache.org long enough to commit the changes...

* new Batik
* improved serializer
* slightly modified sitemap

The serializer now can configure the transcoders (Batik's terminology for
a SVG -> Image class).  This sounds easy but Batik is configured through
Hints and Keys - totally typesafe and extendable but a pig to code...

<serializer name="svg2jpg" ...>
  <parameter name="background_color" type="color" value="#00FF00"/>
</serializer>

The "name" attribute of the parameter tag is the name of the key in the
transcoder (current coding conventions in Batik mean this value is always
converted to uppercase and has "KEY_" appended).  The "type" attribute is
the type of object to interpret the value as - currently string, float,
int and color.  This can and will be extended as needed.  The "value"
attribute is the value of this parameter, it is used to construct the
appropriate object.  This Key is retrieved from the transcoder through
reflection and the assigned.

To Do:
1) document the new procedure of customising the transcoders, and the
assumptions they make
2) implement a mapping from MIME types to transcoder classes - this is one
feature which was lost when the Batik team upgraded the transcoder API.
3) more types of parameters
4) anything else?

Regards, and I hope it works! :-)
Ross Burton


Mime
View raw message