conform-viewers-03-f-novalid.html (3983B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>conform-viewers-03-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: conform-viewers-03-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" onload="test()"> 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: conform-viewers-03-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 <script> 33 <![CDATA[ 34 /** 35 * Generates a 20 character string consisting of characters from the inchars parameter. 36 * The output string will have no repetitions of a character. 37 */ 38 function generatePrefix(inchars) 39 { 40 var ncNameStart = "_abcdefghijklmnopqrstuvwxyzåäöQWERTYUIOPÅÄÖLKJHGFDSAZXCVBNM"; 41 42 var prefix = ncNameStart[Math.floor(Math.random()*ncNameStart.length)]; 43 var leftchars = inchars; 44 var char; 45 for(var i = 0; i < 19; i++) 46 { 47 char = leftchars[Math.floor(Math.random()*leftchars.length)]; 48 leftchars = leftchars.replace(char, ''); 49 prefix += char; 50 } 51 return prefix; 52 } 53 54 /** 55 * The main body of the test. 56 */ 57 function test() 58 { 59 var letters = "abcdefghijklmnopqrstuvwxyzåäö_-.QWERTYUIOPÅÄÖLKJHGFDSAZXCVBNM0123456789"; 60 var prefix = generatePrefix(letters); 61 var g = document.getElementById("test-body-content"); 62 var t = document.getElementById("prefix"); 63 t.textContent = prefix; 64 65 var elm = document.createElementNS("http://www.w3.org/2000/svg", "image"); 66 elm.setAttributeNS(null, "width", 100); 67 elm.setAttributeNS(null, "height", 100); 68 elm.setAttributeNS(null, "x", 100); 69 elm.setAttributeNS(null, "y", 100); 70 elm.setAttributeNS("http://www.w3.org/1999/xlink", prefix+":href", "../images/pinksquidj.png"); 71 elm.setAttributeNS("http://www.this.is.not.an/xlink", "xlink:href", "../images/purplesquidj.png"); 72 g.appendChild(elm); 73 } 74 ]]> 75 </script> 76 77 <text y="100" x="50" display="none"> 78 Generated prefix 1: <tspan id="prefix">...</tspan> 79 </text> 80 <text y="220" x="50"> 81 Status: <tspan id="status">No exceptions.</tspan> 82 </text> 83 84 <g xmlns:xlink="http://example.net/bar"> 85 <image id="image2" width="100" height="100" x="210" y="100" xlink:href="../images/purplesquidj.png"/> 86 </g> 87 88 </g> 89 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 90 <text id="revision" x="10" y="340" stroke="none" 91 fill="black">$Revision: 1.3 $</text> 92 </g> 93 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 94 <!-- comment out this watermark once the test is approved 95 <g id="draft-watermark"> 96 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 97 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 98 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 99 </g> --> 100 </svg> 101 </body> 102 </html>