Re: More on SVG within HTML pages

On Mon, 7 Sep 2009, Henri Sivonen wrote:
> On Sep 7, 2009, at 13:37, Ian Hickson wrote:
> > On Mon, 7 Sep 2009, Henri Sivonen wrote:
> > > On Sep 7, 2009, at 12:36, Ian Hickson wrote:
> > > > > HTML5 defines how to parse text/html into a DOM. It also 
> > > > > specifies above-DOM conformance requirements for elements in the 
> > > > > http://www.w3.org/1999/xhtml namespace. It doesn't specify 
> > > > > conformance requirements for elements in the 
> > > > > http://www.w3.org/2000/svg or http://www.w3.org/1998/Math/MathML 
> > > > > namespaces, so those are non-conforming as far as HTML5 itself 
> > > > > goes.
> > > > 
> > > > That's not quite accurate. MathML's <math> and SVG's <svg> are 
> > > > defined to fit into specific content models, and thus are allowed 
> > > > in a number of places as children of HTML elements ("4.8.15 
> > > > MathML" and "4.8.16 SVG"). What goes on within the MathML and SVG 
> > > > namespaces is up to the MathML and SVG specs, however, and HTML5 
> > > > doesn't have anything to say about that (other than as it affects 
> > > > elements in the HTML namespace).
> > > 
> > > I agree that those sections define where those elements fit when 
> > > some spec licenses those elements to exist at all. But where does 
> > > HTML5 define those elements as existing on its own?
> > 
> > I'm not sure what you mean by "existing".
> 
> I mean "allowed to be used at all" to use your wording from below.

Then the answer is nowhere, the HTML5 spec only extends where <svg> can be 
used by saying it can be used in the same places as <img>, it doesn't 
override any of the SVG spec's requirements on the matter, it only 
augments them. Same with MathML.


> > > Are you saying that even if one doesn't invoke any MathML or SVG 
> > > spec as other relevant specs, the 
> > > {http://www.w3.org/1998/Math/MathML}math and 
> > > {http://www.w3.org/2000/svg}svg elements with no children and no 
> > > attributes are conforming where the sections you references allow 
> > > them?
> > 
> > I'm saying that "The svg element from the SVG namespace falls into the 
> > embedded content, phrasing content, and flow content categories for 
> > the purposes of the content models in this specification", i.e. that 
> > <div> can contain <svg>. Whether <svg> is allowed to have a parent 
> > node from the HTML namespace, or is allowed to be used at all, or has 
> > any required attributes, or whatever, is a matter for the SVG spec.
> 
> So is ...<div><svg></svg></div>... conforming in plain HTML5 (no SVG 
> spec invoked as "relevant") as opposed to an HTML5+SVG x.y profile?

No, since, as you put it, HTML5 doesn't make <svg> "exist".


> > > Or are you saying that some SVG spec and some MathML spec always 
> > > have to be invoked as relevant?
> > 
> > The SVG and MathML specs don't (as far as I know) say anything that 
> > contradicts the HTML spec, they just pick up where HTML leaves off. 
> > Whenever you deal with something in the SVG namespace, the SVG spec is 
> > relevant.
> 
> If some SVG spec is always "relevant", I think this should be called out 
> more clearly in HTML5. (Like it also makes "some version of XML" 
> required for UAs that implement XHTML5.)

UAs aren't required to implement SVG. I don't really understand what you 
mean.

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

Received on Monday, 7 September 2009 11:07:37 UTC