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

Re: SVGWG SVG-in-HTML proposal (ISSUE-41, ISSUE-37)

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 30 Jul 2008 14:44:47 +0100
Message-ID: <4890704F.7040501@cam.ac.uk>
To: Henri Sivonen <hsivonen@iki.fi>
CC: Charles McCathieNevile <chaals@opera.com>, Erik Dahlström <ed@opera.com>, HTML WG <public-html@w3.org>

Henri Sivonen wrote:
> As for VML, the detailed workings of Trident in the case of non-HTML 
> markup in text/html have not been recounted on this mailing list. Does 
> Trident really reparse the source text range occupied by VML as XML?

No. See e.g. http://philip.html5.org/demos/html/ie-xmlns/vml.html for 
some demonstrations. Code like

   <!DOCTYPE html>
   <style>v\: * { behavior:url(#default#VML) }</style>
   <html xmlNS:v>
   <V:ovAL styLE=position:absolute;left:0;top:0;width:100px;height:50px 
FILLColor=blue/bogus ERROR <>

draws a blue oval in IE7.

It's parsed basically the same as normal HTML, except that (when the 
prefix 'foo' has been declared) <foo:bar ...> opens a new element and 
<foo:bar .../> creates a closed element. Other than the need to declare 
and use prefixes, and the incompatibility with the XML namespace aspects 
of CSS and DOM, it seems quite similar to the foreign content proposal 
in the HTML5 spec. (In particular, it's certainly not XML.)

(Various details have been mentioned in the past - e.g. you need an 
<html xmlns:v> (optionally with any attribute value) or a <xml:namespace 
prefix=v> (optionally with an 'ns' attribute with any value) or maybe 
some other incantations to trigger IE's special parsing mode for tag 
names with that prefix (unless you're writing the prefixed tag names via 
document.write, in which case you don't need to declare the prefix); and 
then the CSS just binds behaviour to those elements.)

Philip Taylor
Received on Wednesday, 30 July 2008 13:45:32 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:34 UTC