W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: More on SVG within HTML pages

From: Jeff Schiller <codedread@gmail.com>
Date: Mon, 7 Sep 2009 12:05:16 -0500
Message-ID: <da131fde0909071005y76dd2f95p5a3ba96882b98dd6@mail.gmail.com>
To: HTML WG <public-html@w3.org>

Shelley Powers wrote:
> Simple to do: anything between opening and closing SVG tags that isn't
> HTML5, doesn't exist to the HTML5 validator.

Correct me if I'm wrong, but I think the validator is supposed to
match what the parser is doing.  I may misunderstand what you are
suggesting.  Are you proposing to modify the parsing algorithm of
HTML5 to support an XML parser for the SVG 'bubbles' in an HTML5

When SVG-in-HTML was discussed long back several folks had this
thought (in fact it was part of the SVG WG's intiial proposal), but it
was rejected based on several factors.

1) Non-conforming SVG XML would muck it up for all the HTML5 on the page:

         <svg xmlns="http://www.w3.org/2000/svg"><circle cx="50"
cy="50" r="30" fill="red"/>
        <!-- rest of my HTML page goes here -->

   Because the user forgot to paste the closing </svg>, what happens
to the rest of the page?  The SVG parser will still be in play and
will likely Yellow Screen Of Death or similar.

2) There were also claims of this confusing new users by having two
different ways of handling markup in a document.

3) There were also claims that adding another parser would make things
more complicated for browser vendors (even though all browsers already
require an XML parser).

My biggest concern in this whole mess is that the existing
infrastructure in place for SVG supports only XML (not the HTML5-like
language) and that hand-constructed (non-XML) SVG will not work in
existing tools.  This creates the same sort of mess that XHTML 1.1
created for HTML 4.01.  And hand-authoring SVG is more difficult than
hand-authoring HTML.

When I brought this to the WG, the response seemed to be:

- the SVG tool infrastructure will have to be updated in time for wide
deployment of HTML5
- write lots of tutorials about HTML5-syntax for SVG

I raised a bug for Inkscape [1].  I don't know about other tools
(Adobe Illustrator, Xara, various importing plugins).  It's less of a
concern for SVG-edit [2], since the SVG elements are constructed via
the DOM anyway and our serializer will just turn any pasted text into
white-listed XML based on how the browser parsed it in.

Since no browsers support this syntax right now, tutorials are out of
the question as they would just create MORE confusion.


[1] https://bugs.launchpad.net/inkscape/+bug/367997
[2] http://svg-edit.googlecode.com/
Received on Monday, 7 September 2009 17:05:57 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:51 UTC