Re: HTML 5 integration of SVG and MathML addresses ISSUE-33/mixedUIXMLNamespace-33?

Dan Connolly wrote:

> Noah, I'm interested in your take, as you provided the TAG
> a sort of survey of the space around CDF and your experience
> with Lotus notes etc. seems relevant.
> http://lists.w3.org/Archives/Public/www-tag/2005Oct/0040


Gee, how did that pop up on your radar?  Interesting to read it again, but 
not a major source of detailed ideas for me in drafting the following 
(I.e. readers of this email should feel no need to plow through the 
document referenced above.)

> Have you looked at the integration of MathML and SVG into HTML 5?

If I understand the key design points in the current HTML draft, they 
generalize as:  >>when using the text/html serialization, namespace 
qualification in the DOM is provided only for particular vocabularies that 
are baked into the (then current) version of the HTML Recommendation. Such 
vocabularies will, in practice, be usable without prefix qualification; in 
fact, even well known prefixes like <svg:circle> will not work. In HTML 5, 
the supported vocabularies will be MathML and SVG.<<

(I'm not 100% sure regarding the bit about the prefixes not working if you 
use them;  a quick search of the spec didn't yield a clear answer, but I 
may well not have looked in the right places.)

> [...Dan quotes a sample document with no prefixes...]

To me, the big deals are:

* The fact that new vocabularies have to be explicitly supported with 
modifications to the HTML Recommendations.  Stated differently: this is a 
proposal for non-decentralized extensibility.
* The fact that qualified forms aren't supported (as best I can tell), 
even when conventional prefixes are used.

The first of those points is "the big debate".  I did my best to outline 
the pros and cons in my TPAC presentation [1].  I still am among those who 
believe that it's worth trying very hard to do better.  Insofar as I 
understand Liam Quin's proposal, it seems to offer at least an interesting 
direction, in part because it offers a more decentralized way of 
supporting new vocabularies, and evolving for eventual support in the core 
specification.

On the second point, if a way can be found to make prefixing work better 
in text/html, I think that would be a big plus, as this points a way 
toward eventual convergence of XML and text/html, should users wish to go 
there.  Supporting prefixes, even just for well-known vocabularies like 
SVG, would help with some copy/paste and XSL scenarios, and would also 
greatly increase the size of the polyglot subset.   I understand this is a 
hard problem and I don't at this point have a closed-form solution to 
promote.

For a non-decentralized design, what's proposed in the HTML draft seems 
quite good, modulo the vague wish that there could be some way found to 
support explicit prefixes as well. 

Noah

[1] http://lists.w3.org/Archives/Public/www-archive/2009Nov/0004.html


--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








Dan Connolly <connolly@w3.org>
Sent by: www-tag-request@w3.org
11/10/2009 11:56 PM
 
        To:     www-tag@w3.org
        cc:     "Michael(tm) Smith" <mike@w3.org>, Maciej Stachowiak 
<mjs@apple.com>, (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        HTML 5 integration of SVG and MathML addresses 
ISSUE-33/mixedUIXMLNamespace-33?


John, Noah, TimBL, Henry,

Have you looked at the integration of MathML and SVG into HTML 5?

John, I'm interested in your take, as both an HTML WG
member and a TAG member. I also note that Nokia
provided an editor, Lasse Pajunen, for http://www.w3.org/TR/WICD/ ;
don't feel obliged to represent a Nokia position in the TAG,
but if he's not too far down the hall, I suppose you might
naturally cross paths.

Noah, I'm interested in your take, as you provided the TAG
a sort of survey of the space around CDF and your experience
with Lotus notes etc. seems relevant.
http://lists.w3.org/Archives/Public/www-tag/2005Oct/0040


Henry, I'd like this to cross your radar since you're
chairing the 19 Nov TAG teleconference. On 8 Sep,
Maciej said the issue is all but resolved; HTML WG has no
plans to discuss this issue further as a group.
http://lists.w3.org/Archives/Public/public-html-wg-issue-tracking/2009Sep/0002.html


I don't think it's a "now or never" situation, but
if the 19 Nov agenda isn't full, maybe this fits.


TimBL, you have talked about more general mechanisms in this
space...

This design seems OK to me. There isn't a general-purpose mechanism
for mixing other UI-related namespaces in the spec, but any mechanism
of that sort that should come along should be consistent with
the HTML 5 design, IMO. (I gather XBL and/or XBL2 propose designs
in this space; they seem to be in the someday pile.)
That is: I don't think the HTML 5 design completely addresses
our mixed UI namespace issue, but I'm OK with constraining
any solution to this issue to be compatible with the HTML 5 design.

The HTML 5 design puts MathML elements in the MathML namespace
(and likewise SVG) with no syntactic cost to authors:

[[

Here is an example of the use of MathML in an HTML document:

<!DOCTYPE html>
<html>
 <head>
  <title>The quadratic formula</title>
 </head>
 <body>
  <h1>The quadratic formula</h1>
  <p>
   <math>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
     <mrow>
      <mo form="prefix">−</mo> <mi>b</mi>
      <mo>±</mo>
      <msqrt>
       <msup> <mi>b</mi> <mn>2</mn> </msup>
       <mo>−</mo>
       <mn>4</mn> <mo>⁢</mo> <mi>a</mi> <mo>⁢</mo> <mi>c</mi>
      </msqrt>
     </mrow>
     <mrow>
      <mn>2</mn> <mo>⁢</mo> <mi>a</mi>
     </mrow>
    </mfrac>
   </math>
  </p>
 </body>
</html>
]]
 -- http://dev.w3.org/html5/spec/the-canvas-element.html#mathml


[[
9.2.5.10 The "in body" insertion mode
Status: Last call for comments

When the insertion mode is "in body", tokens must be handled as follows:

A start tag whose tag name is "math"
 
        Reconstruct the active formatting elements, if any.
 
        Adjust MathML attributes for the token. (This fixes the case of
        MathML attributes that are not all lowercase.)
 
        Adjust foreign attributes for the token. (This fixes the use of
        namespaced attributes, in particular XLink.)
 
        Insert a foreign element for the token, in the MathML namespace.
]]
  -- http://dev.w3.org/html5/spec/syntax.html#parsing-main-inbody



For reference:
ISSUE-33 mixedUIXMLNamespace-33 
Composability for user interface-oriented XML namespaces
http://www.w3.org/2001/tag/group/track/issues/33



p.s. I stuck this in tracker as ACTION-332.


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

gpg D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Wednesday, 11 November 2009 17:33:33 UTC