Starter
From Svg wiki
This code is served at http://steltenpower.com/wikiparser.php
<?xml version="1.0" standalone="no"?> <?AdobeSVGViewer save="snapshot"?> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" baseProfile="full" width="6in" height="12cm" viewBox="-1,-11 12,12" preserveAspectRatio="none" onload="init(evt);"> <!-- The AdobeSVGViewer thing is so you can save the current DOM state in ASV, instead of the one initially loaded The SVG spec says you need <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> before <svg>, but usually you better don't baseProfile can also be "tiny" or "basic" or "none", but is essentially metadata, not required for viewers by the SVG specification, but advised viewBox parameters: min_x,min_y width,height or min_x,-(y_min+height) width,height (when using leftbottomorigin (see further)) --> <title>SVG webIDE</title> <desc>collection of SVG+Javascript content including comments aiming to ease cross-viewer SVG content development. Use this instead of a blank document to start of your coding </desc> <!-- Thankfully building on work of helpful people like Doug Schepers, Jim Ley, Jonathan Watt, Cameron McCormack, Holger Will, Andreas Neumann, Jeff Rafter and others (from #svg) --> <defs></defs> <script type="text/ecmascript" xlink:href="http://steltenpower.com/SVGstart.js" /> <g id="leftbottomorigin" transform="translate(-1,-4) scale(1,-1)"> <!-- In case you prefer (0,0) to be in the downleft corner instead of the topleft to compensate for text being turned upside down by this trick you can multiply all y-values by -1 and add an (extra) "scale(1,-1)" at the beginning of the text's transform attribute (or something equivalent) /me thinks about automating this --> <!-- ******** FOR COPYING CODE: A QUICK REFERENCE OF SVG BITS COMMON BITS, BITS OFTEN ASKED FOR, BITS OFTEN DONE WRONG ******* --> <rect x="10" y="-10" height="10" width="10" fill="blue" stroke="none" /> <text transform="scale(1,-1)" x="0.5" y="-5" xml:space="preserve" font-size="0.4"> <tspan>start with THIS instead of an empty document</tspan> <tspan dy="1" x="0.6">when developing SVG content (see source)</tspan> </text> <a xlink:href="http://steltenpower.com/svgbookmarklets.html"><text y="-3" x="1" fill="blue" transform="scale(1,-1)" font-size="0.4" >helpful bookmarklets</text></a> <text x="5" y="-3" transform="scale(1,-1)" font-size="0.4" fill="black">(import with bookmark manager)</text> </g> </svg>
