Hi all. I need to have a linked text inside a svg graph. Here is what I did
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="138pt" height="188pt" viewBox="0.00 0.00 138.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 184)">
<g id="node5" class="node"><title>EQ2</title>
<ellipse style="fill:none;stroke:black;" cx="65" cy="-18" rx="29.1851" ry="18"/>
<text text-anchor="middle" x="65" y="-13.9" style="font-family:Times New Roman;font-size:14.00;">foo <html:a href="http://google.com">bar</html:a></text>
</g>
</g>
</svg>
I expected the namespace for html
and the html:a
tag would result in a proper handling of the bar text. but what I get is that bar is not displayed. As suggested in an answer, I can use the svg:a
element, but I don't understand why my approach does not work. I would expect the browser HTML renderer to kick in and handle that part of the DOM tree.