Thanks for your quick response, Thomas.
Now it works with
grad {fill:url(index.svg#colorgrad);}
Regards
Olaf
Thomas DeWeese wrote:
> Hi Olaf,
>
> Olaf Schnabel wrote:
>
>
>>I use a linear gradient in my SVG file:
>>
>> <linearGradient id="colorgrad">
>
>
>>But if I put the attribute "fill" in a CSS file
>>
>> grad {fill:url(#colorgrad);}
>>
>>and apply it as a CSS class to the rectangle, Batik (1.5.1 / 1.6)
>>returns error messages.
>
>
> This is because the base URL of the CSS file is the CSS file.
> So you are attempting to reference an element with id colorgrad
> in the CSS file, which of course doesn't exist. You need to
> reference the SVG file with your gradient in it. You might
> consider pulling the SVG fills you use in your style sheet
> into a separate SVG file that you can co-locate with the
> style sheet.
>
>
>> <rect width="10" height="10" class="grad"/>
>>
>>Is this the correct behavior or is it an error in the Batik implementation?
>
>
> This is the correct behavior.
>
>
> -----
> To unsubscribe send a message to: [EMAIL PROTECTED]
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
> membership"
> ----
> Yahoo! Groups Links
>
>
>
>
>
>
>
--
Olaf Schnabel
Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093 Zurich, Switzerland
phone: ++41 44 633 3031
e-mail: [EMAIL PROTECTED]
www: http://www.ika.ethz.ch/schnabel
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/