W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

[whatwg] Inline SVG

From: Michel Fortin <michel.fortin@michelf.com>
Date: Fri, 8 Dec 2006 16:12:49 -0500
Message-ID: <FC9DEDBC-D339-4774-A650-3A7D201C3DB4@michelf.com>
Le 8 d?c. 2006 ? 15:20, Leons Petrazickis a ?crit :

> <http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006- 
> December/008444.html>
>
> Unlike Michel Fortin's proposal for <script
> type="image/svg+xml"></script>, I suggest that SVG included like this
> be rendered as an image in that exact spot. We may want to define a
> default height and width for all <inline-xml>...</inline-xml> content.

Well, my idea was that the XML content inside <script type="some xml  
media type"> would be parsed then inserted into the DOM right after  
the script element. In the case of SVG content, that would make the  
image appear exactly where the script tag is.

The XML "script" should be seen in exactly the same way as some  
previous JavaScript that was shown to build a SVG WHATWG logo, only  
the "script" would use an XML syntax instead of JavaScript. In case  
of any parse error, the XML "script" aborts and you get a partial XML  
tree in the DOM plus an error on the script console.

I'm not against using a different tag name, but I don't really see  
the point either. <script> is already parsed as text content by  
current browsers, so for current browsers that can't "execute the  
script", it would be possible for an external JavaScript to parse the  
content, build, and insert the new elements into the DOM.

What worries me most is what IE is going to do with it, because it's  
identical to one of the documented syntaxes for its XML islands. It's  
possible that it "just work" however. I guess someone should test  
that. (It's not very practical for me to check things with IE.)


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
Received on Friday, 8 December 2006 13:12:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC