SVG – Learning by Coding
1: <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2: <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3: "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
4: <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
5: ]>
6:
7: <!-- SVG - Learning by Coding - http://www.datenverdrahten.de/svglbc/ -->
8: <!-- Author: Dr. Thomas Meinike 03/03 - thomas@handmadecode.de -->
9:
10: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
11: xmlns:svglbc="http://www.datenverdrahten.de/svglbc">
12:
13: <title>SVG - Learning by Coding</title>
14: <desc>SVG-Spezifikation in Beispielen</desc>
15:
16: <defs>
17:
18: <!-- eigene Namespace-Definitionen, z. B. Zusatzdaten -->
19: <svglbc:info>
20: <svglbc:author id="nstest" name="Dr. Thomas Meinike" email="thomas@handmadecode.de"/>
21: </svglbc:info>
22:
23: <script type="text/javascript">
24: <![CDATA[
25:
26: function getNSInfo(click_evt)
27: {
28: var svgdoc,info1,info2;
29:
30: svgdoc=click_evt.target.ownerDocument;
31: info1=svgdoc.getElementById("nstest").getAttribute("name");
32: info2=svgdoc.getElementById("nstest").getAttribute("email");
33: alert("Author:\n"+info1+"\n"+info2);
34: }
35:
36: ]]>
37: </script>
38:
39: </defs>
40:
41: <text x="20" y="30" style="fill: #000; font-size: 24px">
42: Eigenen Namespace verwenden</text>
43:
44: <a xlink:href="" cursor="pointer" onclick="return false">
45: <text x="30" y="60" style="fill: #F00; font-size: 14px"
46: onclick="getNSInfo(evt)">Informationen aus svglbc:info abfragen
47: </text>
48: </a>
49:
50: </svg>
[zum Anfang]