W3C home > Mailing lists > Public > public-html@w3.org > July 2008

Re: SVG in HTML proposal

From: Jeff Schiller <codedread@gmail.com>
Date: Tue, 15 Jul 2008 07:53:11 -0500
Message-ID: <da131fde0807150553p2cedc6des5383d4b696c7c759@mail.gmail.com>
To: "Doug Schepers" <schepers@w3.org>
Cc: "Erik Dahlström" <ed@opera.com>, public-html@w3.org, "www-svg@w3.org" <www-svg@w3.org>
On 7/15/08, Doug Schepers <schepers@w3.org> wrote:
>  2) If my SVG has a foreignObject with HTML in it, and the browser does not
>> handle SVG yet, then the contents of that foreignObject will be
>> inadvertently rendered by the UA, which might not be desired.  Any
>> recommendation for that?   html: prefix for all elements?
> This is one reason that I initially suggested the <ext> element [1], so
> that any UA which does not understand SVG but does support <ext>/<fallback>
> (which would be trivial to implement) could not only hide any such
> extraneous code, but also render a fallback (and it would work for any
> non-HTML language, not just SVG, so you could have a fallback for MathML,
> etc.).  We'll have to see if there is support for that particular bit.

But IE7- understands neither SVG nor <ext>.  I assume it it doesn't
understand CSS Namespaces either (in which case we can't use Erik's
suggestion).  There are hacks to add unknown elements in IE though [1], so
with script and IE-specific stylesheets you could work around - for users
who have enabled scripting.

On 7/15/08, Erik Dahlström <ed@opera.com> wrote:

> Having <svg:a> be interpreted by a legacy user agent as <html:a> is perhaps
> not that critical, you can even add a 'src' attribute to have the link work
> in both contexts, so it can be used as a sort of fallback.

I assume you mean a 'href' attribute to the link ;)  I use this very hack on
my blog comments, actually [2].  However, in my case it was intentional and
I was very cognizant of it.  I can't say the same for other authors who want
to just copy and paste SVG fragments into HTML documents and see it work.

Another semi-problem is that text nodes within SVG fragments will be
rendered by IE.  This is a problem with any solution of SVG-in-HTML, not
just the SVG WG proposal and I guess in that case we need to use the
document.createElement() hack to avoid it?

I guess the reality is that for the one non-SVG browser vendor out there
we're always going to have problems with any SVG-in-HTML solution and it
will just come down to arming web authors with the knowledge to work around
that browser's lack of support until such day that...


Received on Tuesday, 15 July 2008 12:53:50 UTC

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