Thanks a lot for the immediate reply.

I am pretty sure that i am using just integers and not float.

But still i will try out using the number format class.

- Sridevi


thomas.deweese wrote:
> 
> 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.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Invalid-CSS-Document-tp18526737p18527121.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to