1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <title>Namespace chaining
</title>
6 <div id=
"d" xmlns:
svg=
"http://www.w3.org/2000/svg" style=
"height: 110px">
9 <script type=
"text/javascript"><![CDATA
[
10 var div
= document
.getElementById("d");
11 div
.innerHTML
= "<svg:svg width='110' height='110'><svg:defs id='defs'><svg:text>TEST FAILED</svg:text></svg:defs><svg:rect x='5' y='5' width='100' height='100' fill='green' id='r'/></svg:svg>";
12 var rect
= document
.getElementById("r");
13 if (rect
.namespaceURI
== "http://www.w3.org/2000/svg") {
14 var defs
= document
.getElementById("defs");
15 defs
.parentNode
.removeChild(defs
);
17 console
.log("Incorrect namespace:", rect
.namespaceURI
);