[webkit-dev] HTML5 Parsing & MathML

Alex Milowski alex at milowski.org
Mon Oct 4 07:40:43 PDT 2010


On Sat, Oct 2, 2010 at 3:48 PM, David Carlisle <d.p.carlisle at gmail.com> wrote:
> Alex Milowski <alex <at> milowski.org> writes:
>
>> >From reading the section on "in foreign content' [1], it would seem that it
>> should assign the 'svg' elements to the MathML namespace when they
>> are embedded as above.  That means cutting and pasting the same
>> content fragment gives two very different interpretations--which is more
>> of a problem for the HTML5 spec than webkit.
>>
>
> As (since?) confirmed elsewhere on another list, but mentioned here for the
> record, the example becomes valid (and parse-able by html5 parser) if you wrap
> the svg in mi elements.
> the presentation mathml token elements, mi, mtext, etc are specified as being
> the extension points where you can embed html (and thus svg).

That presents a challenge to the way the MathML implementation
is current organized.  In the current implementation, token elements
are not suppose to contain element content.  We'll need to
completely re-architect the token elements to handle this in
all situations as we won't get it by default in several cases.  For
example, if the SVG is embedded in an 'mo' element, the
SVG will be ignored.

That also questions what should be done in cases like:

<mo> random text <svg ... </svg> </mo>

I still stand by my position that wrapping "foreign" elements
in token elements in MathML is completely unnecessary
for SVG, HTML, or other vocabularies that have rendering semantics
that translate into some sequence of inline or block boxes.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics


More information about the webkit-dev mailing list