Comment 0 for bug 367997

Revision history for this message
codedread (codedread) wrote :

The HTML5 spec now contains a proposal for SVG-in-HTML (i.e. text/html serialization). This includes things like:

* unquoted attributes
* case-insensitive element and attribute names
* no requirement for tags to be closed
* no requirement for namespace declarations

For example, the following document is a valid syntax for SVG-in-HTML:

<html><body>
  <p>Hello, World!

  <Svg>
    <CIRCLE cx=50 cy=50 r=30 fill=blue>
    <rEcT x="50" y=50.0 width=10E+1 height=50. fill=#0f0>

  <p>Goodbye, cruel World!

</body></html>

It should be possible to copy from "<Svg" to the end of the rect element "#0f0>" paste it into a text document and bring that file up in Inkscape. Of course the DOM serialization and saving the SVG document in Inkscape would produce the following SVG XML document:

<svg xmlns="http://www.w3.org/2000/svg">
  <circle cx="50" cy="50" r="30" fill="blue" />
  <rect x="50" y="50.0" width="10E+1" height="50." fill="#0f0" />
</svg>

Here is a HTML5 parser library: http://code.google.com/p/html5lib/