Re: HTML/MathML integration

On 4/1/08, David Carlisle <davidc@nag.co.uk> wrote:

>  > These people won't suddenly fix their whole toolchain to support math.
>  >  The conscientious will just avoid MathML because of the cost of
>  > making the rest of the page valid.

> In what way will the use of MathML impact on the requirements of the
>  rest of the page?

Imagine a minimal integration ruleset.

"<mathml " ==> switch to XML parser until you get to "</mathml>"

This also implies that
    mathml can't embed other mathml, not even indirectly through SVG.
    you can't use any html within the mathml, unless it is xhtml.

So what happens when someone *does* write

<mathml><div>...

or mis-spells the </mathml>

or ...


>  >   Most people will go ahead and use
>  > it in a simplified, invalid manner, which the various browsers will
>  > correct in different adhoc ways.  That is the worst of both worlds.

> Sorry, I don't understand this point at all. There may be some
>  discussion about how far the syntax of "mathml-in-html" may differ from
>  that of "mathml-in-xml" but surely it's a basic premise of the html5
>  design that whatever syntax is finally agreed on, it will have a
>  specified mapping to a DOM, and won't require ad hoc browser fixes?

Not when it is written correctly.

But it won't be written correctly.  That is part of the culture of
html.  And browsers will try to fix it up anyhow.  That is part of the
culture of html browsers.

So the real questions are:

How can we reduce the number of errors?
How can we make the errors predictable enough that the fixups are consistent?

To use concrete examples from Jacques Distler via Sam Ruby,

When people *do* write the "invalid":
    <math>100,000</math>

should it mean:
    <mhtml><mn>146,382</mn></mhtml>
or:
    <mhtml><mn>146</mn><mo>,</mo><mn>382</mn></mhtml>
or something else?

The decision needs to be specified.  And in html, the short "invalid"
form should probably be acceptable, representing the simpler case.
(You can always be explicit to get the other case.)  If mathml needs
to keep it invalid (to ensure quality), then maybe the two languages
aren't ready for tight integration.

Note that this won't stop MathML from integrating with SVG or docbooks
-- it is HTML that is the odd man out.

-jJ

Received on Tuesday, 1 April 2008 17:11:05 UTC