Repository navigation
Description
The MathML Core spec defines the following integration points:
https://mathml-refresh.github.io/mathml-core/#othertech
In particular, it relies on the validator schema:
https://github.com/validator/validator/blob/master/schema/.drivers/html5-svg-mathml.rnc#L9
https://github.com/validator/validator/blob/master/schema/.drivers/html5-svg-mathml.rnc#L11
https://github.com/validator/validator/blob/master/schema/.drivers/html5-svg-mathml.rnc#L18
https://github.com/validator/validator/blob/master/schema/.drivers/html5-svg-mathml.rnc#L29
By default MathML4's RelaxNG schema does not allow foreign content in token elements. However, there are suggestions to allow it in Chapter 6:
https://mathml-refresh.github.io/mathml/chapter6.html#world-int-combine-other
Finally, the WHATWG HTML5 spec describes integration points for mi, mo, mn, ms, and mtext, annotation-xml and foreignObject:
https://html.spec.whatwg.org/#mathml
https://html.spec.whatwg.org/#svg-0
MathML WPT Tests:
https://github.com/web-platform-tests/wpt/tree/master/mathml/relations/html5-tree
Activity
fred-wang commentedon Jun 10, 2019
cc @annevk @sideshowbarker @bkardell @rwlbuis
I'd like to better align all these definitions (at least Core and WHATWG) and not refer to the validator schema. Some things to consider:
<math>is allowed in<foreignObject>per the HTML5 spec because it's flow content (probably the validator schema should do common.elem.flow |= math).<svg>is allowed in<annotation-xml>per the HTML5 spec because it's flow content (probably the validator schema should do common.elem.flow |= svg). I believe we can remove the restriction on the encoding attribute (see also Simplification of the <semantics> element mathml-polyfills#33).<html>in<annotation-xml>but I'm not sure that's true per the HTML5 spec. The MathML full spec contains such an example https://mathml-refresh.github.io/mathml/chapter5.html contains such an example. Do we really want that? If so, can the restriction on the encoding attribute be removed (see issue Simplification of the <semantics> element mathml-polyfills#33)?<mtext>only or in any token element? Should we instead have some generic foreignObject-like MathML element?fred-wang commentedon Jun 12, 2019
I've improved a bit the description of HTML parsing:
https://mathml-refresh.github.io/mathml-core/#web-platform-integration
My proposal is the following:
It seems the only controversial change is whether to allow phrasing content in mi, mo, mn, ms too. Some arguments:
<mn><input id="number" type="number" value="42"></input></mn>is more correct for MathML authors than using mtext. Or you can use<mo><select>my list of operators</select></mo>with custom lspace/rspace attributes which is not possible with mtext etcAlso this is perhaps a separate discussion, but we might want to allow foreign content in mrow that accept phrasing content (or introduce a foreignObject-like MathML element). Rationale:
<annotation-xml>to embed foreign content (see the non-valid case discussed in Simplification of the <semantics> element mathml-polyfills#33).fred-wang commentedon Jun 12, 2019
@sideshowbarker I think this is a bit a separate discussion, but yes it would make sense to have the HTML checker verify validations against the stricter MathML Core spec (perhaps as a default option). As I understand, Apple's concern is about the fact that a stricter MathML could break backward compatibility, so we are implementing these restrictions under a "MathML Core" flag. But in general there should be no problem with improving or extending MathML support. Note that in this case, my proposal is actually to make things more relaxed (see #101 (comment)).
davidcarlisle commentedon Jun 12, 2019
Personally I'd be in favour of this.
The original description of nesting in mathml suggested html be allowed in all token elements but (as far as I recall the conversations) when the actual merge got specified in whatwg/html5 there was a feeling to be cautious at first and restrict the integration points so just allow mtext (or at least only declare that case as valid input) but if there are no real implementation hurdles here then treating all token elements in the same way (and declaring them valid author input) if they have html would be better.
NSoiffer commentedon Jun 17, 2019
Just want to be clear about the proposal...
Is the proposal to all foreign content at the character level or token level. That is, is this legal:
<mn> 23 <input> ... </input> 4 </mn>If not, then this isn't a direct replacement for
mglyphsince that acts as a character. On the other hand, if we say any foreign content must be the entire contents ofmn,mtext, etc., then that likely simplifies implementations.Personally, I like the idea of a new foreign object element, but I think that ship has sailed.
fred-wang commentedon Jun 17, 2019
Yes AFAIK that's currently legal per the HTML spec, so the proposal is to accept it in core too (rather than following the validator)
Update description about integration points (refer to HTML) and menti…
fred-wang commentedon Jun 17, 2019
We agree to follow what HTML allows during today's meeting.
Section updated: https://mathml-refresh.github.io/mathml-core/#html-and-svg
NSoiffer commentedon May 19, 2020
This has the 'need-polyfill' label. What needs to be polyfilled?
fred-wang commentedon May 19, 2020
I think this can be removed.
fred-wang commentedon May 19, 2020
I'm also removing need tests as we already have some and most are in HTML actually. So we can close this.