You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by BORGES Charles <ch...@cegetel.fr> on 2003/10/09 16:06:14 UTC

Problem in SVGSerializer

Hi,

In the configure method of org.apache.cocoon.serialization.SVGSerializer
there is a problem when mapping config parameters to transcoder hints:

When  the parameter type is string, nothing is set. 
For example if you're using 
<parameter name="user_stylesheet_uri" type="string" value="svg.css"/>
in the configuration of a SVGSerializer, the corresponding batik
KEY_USER_STYLESHEET_URI is set to ""
In configure():

String keyType = parameters[i].getAttribute("type", "STRING").toUpperCase();
if ("FLOAT".equals(keyType)) {
	// Can throw an exception.
      value = new Float(parameters[i].getAttributeAsFloat("value"));
} else if {

	...

} else {
   	// Assume String, and get the value. Allow an empty string.
      value = parameters[i].getValue("");
}

I think it should be value = parameters[i].getAttribute("value") instead.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org