W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: SVG in text/html, getting closer

From: Doug Schepers <schepers@w3.org>
Date: Sun, 08 Mar 2009 23:17:08 -0400
Message-ID: <49B48A34.6090702@w3.org>
To: public-svg-wg@w3.org
Hi, Cam-

Cameron McCormack wrote (on 3/2/09 7:24 PM):
>    * Should prefixed svg elements work (be put in the proper namespace)?
> I don’t think we need to try to support such content in HTML.

It's legal in XHTML, though I don't know how common in general that 
practice is.  Ideally, SVG in text/html would not be too far off from 
SVG in XHTML.  What are the constraints that make permitting this 
troublesome (other than the general distaste for XML Namespaces)?

This is not a critical issue to me, but I'd like to see some evidence 
that it's a real problem, rather than an arbitrary decision.

>    * Instead of requesting that unquoted attributes etc. be parse errors,
>      should we instead suggest that authors write polyglot SVG-in-HTML
>      and SVG-in-XHTML documents, and validate against both of those
>      schemas?
> I’m not sure if recommending the creation of polyglot documents is a
> good idea, due to the issues of differences in XHTML depending on
> whether it is parsed as XML or HTML.  Although I don’t see where there
> would be differences for SVG content.  I think it makes more sense to
> have the conformance errors be in HTML, rather than suggesting authors
> to validate to two different languages.

I agree with Cameron here.

>    * Should a missing xmlns="http://www.w3.org/2000/svg" attribute on a
>      root<svg>  element be a parse error?
> Yes, that would be consistent with our other decisions.

Yes, at least until a new version of XML/Namespaces comes out that 
allows that.

>    * How do we fix our suggestion that about not generating implied
>      <html>  and<body>  open tags when the<svg>  open tag is the first one
>      encountered?
> Not sure yet.

Flag the MIME Type as an error for the console, and parse it as XML? 
This would be problematic if the person wanted to have SVG as the root 
with some text/html in <foreignObject>... But in that case, they could 
simply make the root <html>.

I don't see a real use-case here, and tying ourselves to a drastic 
solution like Henri proposed seems like it will make it more difficult 
to code cleanly in XML-next, with more permissive error recovery.

-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
Received on Monday, 9 March 2009 03:17:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:29:41 UTC