struct-dom-16-f-isvalid.html (4806B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>struct-dom-16-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: struct-dom-16-f-manual.svg</h1> 9 <svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 10 <!--======================================================================--> 11 <!--= SVG 1.1 2nd Edition Test Case =--> 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-dom-16-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-size="18"> 31 <svg id="testSVG" /> 32 <text id="failText" x="350" y="350" font-size="50" fill="red">FAIL</text> 33 <text id="passText" x="350" y="300" font-size="50" display="none">PASS</text> 34 <script> 35 <![CDATA[ 36 try 37 { 38 var passCount = 0; 39 var testSVG = document.getElementById("testSVG"); 40 41 var testSVGNumber = testSVG.createSVGNumber(); 42 if (0 == testSVGNumber.value) 43 { 44 passCount++; 45 } 46 47 var testSVGLength = testSVG.createSVGLength(); 48 if (0 == testSVGLength.value) 49 { 50 passCount++; 51 } 52 53 var testSVGAngle = testSVG.createSVGAngle(); 54 if (0 == testSVGAngle.value) 55 { 56 passCount++; 57 } 58 59 var testSVGPoint = testSVG.createSVGPoint(); 60 if (0 == testSVGPoint.x && 0 == testSVGPoint.y) 61 { 62 passCount++; 63 } 64 65 var testSVGMatrix = testSVG.createSVGMatrix(); 66 if (1 == testSVGMatrix.a && 0 == testSVGMatrix.b && 0 == testSVGMatrix.c && 1 == testSVGMatrix.d && 0 == testSVGMatrix.e && 0 == testSVGMatrix.f) 67 { 68 passCount++; 69 } 70 71 var testSVGRect = testSVG.createSVGRect(); 72 if (0 == testSVGRect.x && 0 == testSVGRect.y && 0 == testSVGRect.width && 0 == testSVGRect.height) 73 { 74 passCount++; 75 } 76 77 var testSVGTransform = testSVG.createSVGTransform(); 78 if (1 == testSVGTransform.type && 0 == testSVGTransform.angle && 1 == testSVGTransform.matrix.a && 0 == testSVGTransform.matrix.b && 0 == testSVGTransform.matrix.c && 1 == testSVGTransform.matrix.d && 0 == testSVGTransform.matrix.e && 0 == testSVGTransform.matrix.f) 79 { 80 passCount++; 81 } 82 83 var testSVGTransformFromMatrix = testSVG.createSVGTransformFromMatrix(testSVGMatrix); 84 if (1 == testSVGTransformFromMatrix.type && 0 == testSVGTransformFromMatrix.angle && 1 == testSVGTransformFromMatrix.matrix.a && 0 == testSVGTransformFromMatrix.matrix.b && 0 == testSVGTransformFromMatrix.matrix.c && 1 == testSVGTransformFromMatrix.matrix.d && 0 == testSVGTransformFromMatrix.matrix.e && 0 == testSVGTransformFromMatrix.matrix.f) 85 { 86 passCount++; 87 } 88 89 if (8 == passCount) 90 { 91 document.getElementById("failText").setAttribute("display", "none"); 92 document.getElementById("passText").setAttribute("display", "inline"); 93 } 94 } 95 catch(ex) 96 { 97 alert("ERROR: " + ex.message); 98 99 } 100 ]]> 101 102 </script> 103 </g> 104 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 105 <text id="revision" x="10" y="340" stroke="none" 106 fill="black">$Revision: 1.5 $</text> 107 </g> 108 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 109 <!-- comment out this watermark once the test is approved --> 110 <g id="draft-watermark"> 111 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 112 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 113 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 114 </g> 115 </svg> 116 </body> 117 </html>