
Originally Posted by
jessicay
Was checking out JSR 226 SVGT RI. Trying with Nokia prototype SDK.
simple.svg file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="176" height="176"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve" version="1.1" baseProfile="tiny">
<defs>
<rect id="rect" width="20" height="30" rx="3" fill="blue"/>
<circle id="circle" cx="15" cy="15" r="10" fill="yellow"/>
</defs>
<use id="displayshape" xlink:href="#rect"/>
</svg>
My MIDlet just trying to change the displayshape to circle instead. use the following code,
//get Document first
SVGElement shape = (SVGElement)(doc.getElementById("displayshape"));
shape.setFloatTrait("x", 30);
shape.setFloatTrait("y", 30);
shape.setTraitNS("http://www.w3.org/1999/xlink", "href", "#circle");
System.out.println("new href is"+shape.getTraitNS("http://www.w3.org/1999/xlink", "xlink:href"));
the element shown on screen does change the coordinates accordingly but not the shape, though the print out info for "new href" is "#circle". It does not matter if I use "xlink:href" instead of "href".
Counldn't find anything wrong. Anybody got ideas?
Thanks,
*Sigh* .. 1.5 years later and this bug stilll seems not to be fixed. I try to change the "xlink:href" attribute in a <use> tag by invoking:
Code:
m_CurrentElement.setTraitNS("http://www.w3.org/1999/xlink", "href", "#Entry3");
But it doesn't work. Any hints? And btw: Is the JSR 226 implementation on a real NOKIA Phone broken as well?