Hi Sangaiah,

Sridevi Sangaiah <[EMAIL PROTECTED]> wrote on 07/18/2008 06:49:09 
AM:

> My SVG document has a style attribute like 
> 
>         style="fill: rgb(243,242,255); fill-opacity: 1; stroke-opacity: 
1;
> stroke-width: 1;"
> 
> After SVG is rendered, on a user selection event, i have to increase the
> stroke-width of the selected SVG element.
> 
> I am using Batik's SVGStylableElement API to accomplish this. I am doing
> something like
> 
> targetElement.getStyle().setProperty(cssPropertyName, cssPropertyValue, 
"");
> 
> But occasionally i am getting the following Exception
> 
> Invalid CSS document.
> 
>    at 
org.apache.batik.css.engine.CSSEngine.parseStyleDeclaration(Unknown
> Source)

   IIRC CSS Properties can't use 'exponential' notation for floating
point numbers (i.e. 1.0e-3 instead of 0.001).  So my guess is that you
are tripping over this since the default float to String conversion will
use exponential notation.  I think you can avoid this using the 
NumberFormat
class.

Reply via email to