Title: Nachricht
I am trying to assign a custom cursor to an element. If I load a SVG file like
 
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="800" height="300">
 <defs>
  <cursor id="magglass" xlink:href="" x="10" y="11"/>
 </defs>
 <g style="cursor:url(#magglass)">
  <rect x="200" y="100" width="100" height="40"
    style="fill:rgb(0,255,255)"/>
  <text x="210" y="125"> Cursor Test </text>
 </g>
</svg>
this always results in an error. Batik (I'm using version 1.5) complains about an 'invalid CSS declaration'. But as far as I can see the style attribute for the <g>-element is correct. Opening the file with squiggle shows:
 
org.w3c.dom.DOMException: file:/D:/Documents/SVG/CursorTest.svg:
The attribute "style" represents an invalid CSS declaration ("cursor:url(#magglass)").
Original message:
A malformed value was assigned to a "cursor" property.
    at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(Unknown Source)
    at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source)
    at org.apache.batik.bridge.CSSUtilities.getComputedStyle(Unknown Source)
    at org.apache.batik.bridge.CSSUtilities.convertDisplay(Unknown Source)
    at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
    at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
    at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
    at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)
 
 
    Regards
        Wolfgang Reh
 
 
 
Wolfgang Reh

Scheydgasse 41
1210 Wien

mailto:[EMAIL PROTECTED]
 

Reply via email to