[whatwg] Inline SVG

I forgot to reply to these e-mails after the recent addition to the spec 
of an SVG syntax. The replies below are in the context of the text that 
briefly existed. However, the SVGWG has since asked for that section to be 
removed, and so the text is currently commented out. We are currently 
waiting for the SVGWG to return to us on the matter.


On Fri, 8 Dec 2006, Leons Petrazickis wrote:
> 
> How about this for HTML5:
> <object type="image/svg+xml">
>    <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
>        <circle cx="100" cy="50" r="40" stroke="black"
> stroke-width="2" fill="red"/>
>    </svg>
> </object>
> 
> And this for XHTML5:
> <object type="image/svg+xml">
> <![CDATA[
>    <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
>        <circle cx="100" cy="50" r="40" stroke="black"
> stroke-width="2" fill="red"/>
>    </svg>
> ]]>
> </object>
> 
> If that's over-complicating the semantics of <object>, we could 
> introduce an inline <xml> tag that's similar to the inline <script> and 
> <style> tags. It would have a type="" attribute to specify the mimetype, 
> and its contents would be within a CDATA block in XHTML5.

It seems easier just to allow <svg> directly in the markup.


On Fri, 8 Dec 2006, Leons Petrazickis wrote:
> 
> The basic idea is that HTML5 is not an XML or SGML format. We may want 
> inline SVG and other XML-based formats, but we don't want to define 
> exceptional parsing rules for such. Such rules are already defined 
> elsewhere, just as with Javascript and CSS.

Why don't we want new parsing rules?


[snip various other proposals that were discussed in my big e-mail back 
when I did the whole SVG/MathML in HTML thing]

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 6 May 2008 19:00:03 UTC