2 <!ATTLIST bar id ID #REQUIRED
>
4 <svg version=
"1.1" baseProfile=
"basic" id=
"svg-root"
5 width=
"100%" height=
"100%" viewBox=
"0 0 480 360" onload=
"runTest()"
6 xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink">
7 <!--======================================================================-->
8 <!--= SVG 1.1 2nd Edition Test Case =-->
9 <!--======================================================================-->
10 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
11 <!--= Institute of Technology, European Research Consortium for =-->
12 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
13 <!--= All Rights Reserved. =-->
14 <!--= See http://www.w3.org/Consortium/Legal/. =-->
15 <!--======================================================================-->
17 if (window.testRunner)
18 testRunner.dumpAsText();
20 var e = document.getElementById('target');
21 var tref = document.createElementNS('http://www.w3.org/
2000/svg', 'tref');
22 tref.setAttributeNS(
"http://www.w3.org/1999/xlink",
"href",
"#hello");
26 <g id=
"test-body-content" font-family=
"SVGFreeSansASCII,sans-serif" font-size=
"18">
27 <!-- Test case label -->
28 <text x=
"75" y=
"25" font-family=
"SVGFreeSansASCII,sans-serif" font-size=
"12" fill=
"blue">Test dynamically adding 'tref' element.
</text>
30 <!-- now make a new SVG document fragment, and hide it from being rendered -->
32 <text id=
"hello">F
<tspan fill=
"blue">l
</tspan><tspan fill=
"red" font-size=
"100">a
</tspan><tspan fill=
"yellow">t
<tspan fill=
"lime">t
</tspan></tspan><tspan fill=
"orange" dx=
"50">e
</tspan><tspan fill=
"purple">n
</tspan><tspan fill=
"red">e
</tspan><tspan fill=
"black">d
</tspan></text>
35 <text x=
"75" y=
"200" font-size=
"36" font-family=
"sans-serif" fill=
"green" id=
"target">
39 <g font-family=
"SVGFreeSansASCII,sans-serif" font-size=
"32">
40 <text id=
"revision" x=
"10" y=
"340" stroke=
"none" fill=
"black">$Revision:
1.4 $
</text>
42 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>
43 <!-- comment out this watermark once the test is approved -->
44 <!--<g id="draft-watermark">
45 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
46 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
47 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>