This is broken:
<svg>
<defs>
<circle id='stamp' r='10' fill='blue'/>
</defs>
<!-- this should render a red circle in the top left -->
<use xlink:href='#stamp' x='20' y='20' fill='red' stroke='blue'/>
</svg>
The <use> element doesn't recognise the xlink:href attribute. This line in the generated code...
setAttribute( use, 'xlink:href', "#stamp" );
...should be something like this instead:
setAttributeNS( use, xlink, 'href', '#stamp' );
(where xlink is "http://www.w3.org/1999/xlink")
This is broken:
The
<use>element doesn't recognise thexlink:hrefattribute. This line in the generated code......should be something like this instead:
(where
xlinkis"http://www.w3.org/1999/xlink")