rendered paste body<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?AdobeSVGViewer save="snapshot"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg
xmlns:svg = "http://www.w3.org/2000/svg"
xmlns:xlink = "http://www.w3.org/2000/svg"
version="1.0"
width="21cm"
height="29.700001cm"
viewBox="0 0 744 1052"
id="SVGTest"
onload="CreateRefs(100);">
xml:space="preserve">
<script type="text/javascript" id="script"> <![CDATA[
var svgNS = "http://www.w3.org/2000/svg";
var xlinkNS = "http://www.w3.org/1999/xlink";
function CreateRefs(nr) {
ky = 1;
kx = 1;
for (var I = 1; I <= nr; I++)
{
//var newUseEl = document.createElementNS(svgNS,"use");
//newUseEl.setAttributeNS(null,"x", 30 * kx);
//newUseEl.setAttributeNS(null,"y", 30 * ky);
//newUseEl.setAttributeNS(xlinkNS,"href","#mySymbol");
//newUseEl.setAttributeNS(null,"fill-opacity","0.5");
//document.getElementById("firstGroup").appendChild(newUseEl);
var grup = svgDocument.createElementNS(svgNS, "g");
grup.setAttributeNS(null, "id", "grp_ref_" + I);
grup.addEventListener("mouseover",newFunction("on_mouse_over("+I+")"),false)
document.rootElement.appendChild(grup)
//document.getElementById("firstGroup").appendChild(grup);
var rect = svgDocument.createElementNS(svgNS, "rect");
rect.setAttributeNS(null,"x", 30 * kx - 10);
rect.setAttributeNS(null,"y", 30 * ky - 10);
rect.setAttributeNS(null,"width" , 20);
rect.setAttributeNS(null,"height", 20);
rect.setAttributeNS(null,"fill","red");
rect.setAttributeNS(null,"fill-opacity","0.4");
document.getElementById("grp_ref_"+I).appendChild(rect);
var data = svgDocument.createTextNode(I+1);
var text = svgDocument.createElementNS(svgNS, "text");
text.setAttributeNS(null,"x", 30 * kx);
text.setAttributeNS(null,"y", 30 * ky + 5);
text.setAttributeNS(null,"fill-opacity","1");
text.setAttributeNS(null, "text-anchor", "middle");
text.appendChild(data);
document.getElementById("grp_ref_"+I).appendChild(text);
if (I % 10 == 0) {
ky = ky + 1;
kx = 0;
}
kx = kx + 1;
}
}
function newFunction(){
alert('1');
}
]]>
</script>
<defs>
<symbol id="mySymbol" overflow="visible">
<rect id="redRect" fill="red" stroke="none" x="-10" y="-10" width="20" height="20" />
<use transform="rotate(45)" xlink:href="#redRect" />
<use transform="rotate(25)" xlink:href="#redRect" />
</symbol>
</defs>
<g id="firstGroup">
<rect
width="636.79382"
height="945.06165"
x="53.650303"
y="73.650352"
style="opacity:1;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:#3d0707;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect_external" />
</g>
</svg>