cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borges Charles <charlesborges_...@yahoo.fr>
Subject SVGSerializer patch
Date Wed, 19 Nov 2003 18:27:33 GMT
Hi,

Here's proposed SVGSerializer patch to support request
parameters.

The following changes have been made:

Configuration
=============
1. 
The <use-request-parametes> tag is recognized to allow
the serializer to use request parameters.
if true ==> All the declared batik keys can be
overriden by request parameters.

3. 
The value attribute of the key now means it's a
default value and is not mandatory anymore.

4.
A default TranscodingHints is configured with all the
keys entries which have a default value

5.
A Map is used to keep information on batik transcoding
keys and their "types" (INTEGER, ...)

Processing
==========

1.
The SVGSerializer implements the SitemapModelComponent

2.
A current TranscodingHints is built overriding the
default one and adding new key values if their "types"
can be resolved.

EXEMPLE
=======

1.
in the batik block sitemap add this instead of the
current the svg2png serializer:

<map:serializer logger="sitemap.serializer.svg2png"
name="svg2png"
src="org.apache.cocoon.serialization.SVGSerializer"
mime-type="image/png">
 <use-request-parameters>true</use-request-parameters>
 <parameter name="indexed" type="integer" value="16"/>
 <parameter name="height" type="float"/>
 <parameter name="width" type="float"/>
</map:serializer>

2.
Try this:
samples/batik/batikLogo.png
... the normal logo
or
samples/batik/batikLogo.png?width=200&height=100
... small logo
or
samples/batik/batikLogo.png?width=200&height=100&indexed=2
... ugly!










=====
BORGES C.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran├žais !
Yahoo! Mail : http://fr.mail.yahoo.com
Mime
View raw message