struct-svg-01-f-isvalid.html (3989B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>struct-svg-01-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: struct-svg-01-f-manual.svg</h1> 9 <svg id="svg-root" width="100%" height="100%" 10 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" 11 xmlns:xlink="http://www.w3.org/1999/xlink"> 12 <!--======================================================================--> 13 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> 14 <!--= Institute of Technology, European Research Consortium for =--> 15 <!--= Informatics and Mathematics (ERCIM), Keio University). =--> 16 <!--= All Rights Reserved. =--> 17 <!--= See http://www.w3.org/Consortium/Legal/. =--> 18 <!--======================================================================--> 19 20 <title id="test-title">$RCSfile: struct-svg-01-f.svg,v $</title> 21 <defs> 22 <font-face 23 font-family="SVGFreeSansASCII" 24 unicode-range="U+0-7F"> 25 <font-face-src> 26 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> 27 </font-face-src> 28 </font-face> 29 </defs> 30 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> 31 32 <svg id="testSVG" /> 33 34 <text x="20" y="40">Initial value of the 'svg' tag's 'width' attribute: </text> 35 <text x="20" y="60" id="widthResult" /> 36 37 <text x="20" y="100">Initial value of the 'svg' tag's 'height' attribute: </text> 38 <text x="20" y="120" id="heightResult" /> 39 40 <text x="20" y="160">Initial value of the 'svg' tag's 'x' attribute: </text> 41 <text x="20" y="180" id="xResult" /> 42 43 <text x="20" y="220">Initial value of the 'svg' tag's 'y' attribute: </text> 44 <text x="20" y="240" id="yResult" /> 45 46 <text id="failText" x="350" y="350" font-size="50" fill="red">FAIL</text> 47 48 <script><![CDATA[ 49 try 50 { 51 var testSVG = document.getElementById("testSVG"); 52 var pass = true; 53 54 var initialWidth = testSVG.width.baseVal.valueAsString; 55 document.getElementById("widthResult").appendChild(document.createTextNode(initialWidth)); 56 57 if("100%" != initialWidth) 58 { 59 pass = false; 60 } 61 62 var initialHeight = testSVG.height.baseVal.valueAsString; 63 document.getElementById("heightResult").appendChild(document.createTextNode(initialHeight)); 64 65 if("100%" != initialHeight) 66 { 67 pass = false; 68 } 69 70 var initialX = testSVG.x.baseVal.valueAsString; 71 document.getElementById("xResult").appendChild(document.createTextNode(initialX )); 72 73 if("0" != initialX ) 74 { 75 pass = false; 76 } 77 78 var initialY = testSVG.y.baseVal.valueAsString; 79 document.getElementById("yResult").appendChild(document.createTextNode(initialY)); 80 81 if("0" != initialY ) 82 { 83 pass = false; 84 } 85 86 if(pass) 87 { 88 document.getElementById("failText").setAttribute("display", "none"); 89 } 90 } 91 catch(ex) 92 { 93 //alert('ERROR: ' + ex.message); 94 }]]> 95 </script> 96 97 </g> 98 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 99 <text id="revision" x="10" y="340" stroke="none" 100 fill="black">$Revision: 1.4 $</text> 101 </g> 102 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 103 <!-- comment out this watermark once the test is approved --> 104 <!-- 105 <g id="draft-watermark"> 106 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 107 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 108 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 109 </g> 110 --> 111 </svg> 112 113 </body> 114 </html>