-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
structuring common attributes #361
Comments
Note a third possibility, not currently used, between making Core global attributes valid on all presentation or all mathml, would be to just make them valid on the Core elements so not add them to non-Core Presentation such as |
#363 addressed most of this adding core global attributes and intent+arg on all presentation elements (including non core ones) https://w3c.github.io/mathml/#presm_presatt Alhough we currently don't explicitly say what effect they have on eg mstack, perhaps will be enough for https://w3c.github.io/mathml/#presm_presatt_core to make a general comment how core-defined attributes should be interpreted. (I think in fact most of them will work as expected even without polyfill as the html ones will have an effect anyway even on unknown elements.) |
I'm in favor of MathML 4 being a proper superset of Core. |
The June 9 meeting agreed that MathML should be a proper superset of Core. |
MathML3 , in addition to attributes specified on each element had
id
,xref
,class
,style
,href
andother
mathcolor
,mathbackgroud
mathvariant
,mathsize
,dir
It is perhaps worth noting given recent discussion of
intent
thatclass
,style
,href
are similar presentation oriented attributes, introduced as global in MathML3 chapter 2, but given no specific mention in Chapter 4. While these could be used to control CSS acting directly on Content, in practice Content is rendered in most systems via translation to Presentation and so the effect of these attributes depends on the system-specific way they are copied to any generated presentation form.This structure is still in the draft MathML4 description, notably Attributes common to Presentation, https://w3c.github.io/mathml/#presm_presatt Just lists
mathcolor
,mathbackgroud
However the draft schema builds up from MathML Core and is structured rather differently.
Core has a much longer list of global attributes,
https://w3c.github.io/mathml-core/#global-attributes
and almost all attributes are global (partly as
<mstyle>
is down-played in Core becoming essentially a synonym for<mrow>
)so attributes such as
onclick
are global in Core, as are traditional MathML attributes such asmathvariant
The Global Core Attributes are currently incorporated into the
mathml4-presentation
schema, and so also themathml4
full schema, as attributes common to Presentation elementsThis means that for example the following invalid MathML 3 example (as
mathvariant
was just allowed on token elements andmstyle
)<msup mathvariant="bold"><mn>1</mn><mi>x</mi></msup>
is valid MathML Core, and valid to the MathML4 Schema, but not described as valid in the text of the MathML 4 draft.
The same is true of
<msup onclick="something" tabindex=5"><mn>1</mn><mi>x</mi></msup>
and
<msup intent="whatever"><mn>1</mn><mi>x</mi></msup>
I am assuming that as far as possible we want MathML4 Full to be a superset of MathML Core so that we do want to make these attributes at least common to Presentation (as allowed by the current schema draft) but some might make sense being made global in Full as well.
Either way, even if they are just valid on Presentation, we probably need to say something about how far they are expected to have a effect on non-web-platform implementations. I'm assuming they can basically be ignored in that case. You can't really do much with an onevent javascript reference if reading MathML in to TeX or Word or Mathematica etc. An alternative would be to not add these attributes to full and structure Core as an "extended subset" of Full that adds these features as well as subsetting MathML Full. That has some benefits but means that MathML Core Fragments are not valid MathML which I think complicates the "story".
The text was updated successfully, but these errors were encountered: