Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.
This normative text registers three media types for MathML,
application/mathml+xml
, application/mathml-presentation+xml
and
application/mathml-content+xml
, in conformance with [RFC4288]
and [W3CRegMedia].
The media-types have been approved by IESG for registration with IANA as
announced by IETF
and are visible on the
list of application media-types [MediaTypesList].
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
This document was published by the Math Working Group as a Group Note using the Note track.
Group Notes are not endorsed by W3C nor its Members.
This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
The W3C Patent Policy does not carry any licensing requirements or commitments on this document.
This document is governed by the 2 November 2021 W3C Process Document.
MathML contains two distinct vocabularies. Presentation markup is
for encoding visual presentation, and consists of the elements defined
in Chapter 3 of the MathML specification.
Content markup is for encoding mathematical meaning, and consists of the elements defined in
Chapter 4 of the MathML specification.
In addition, both the presentation and content
vocabularies contain the math
, semantics
,
annotation
and annotation-xml
elements. The MathML
media types should be used as follows:
application/mathml-presentation+xml
MathML instances that consist solely of presentation markup.
application/mathml-content+xml
MathML instances that consist solely of content markup.
application/mathml+xml
Any valid MathML instance. Must be used for MathML instances that are a mix of presentation and content markup, or where the composition of an instance is not known or cannot be guaranteed.
Some MathML applications may import and export only one of these two vocabularies, while others may produce and consume each in a different way, and still others may process both without any distinction between the two. Internally, many MathML processors favor one vocabulary, and support the other vocabulary via conversion if at all. For example, computational software typically favors content markup while typesetting software generally favors presentation markup. By using separate media types for MathML instances consisting solely of presentation or solely of content markup, such processors can conduct negotiation for MathML representations in the preferred vocabulary. For example, consider two web services offering mathematical computation services such as a spreadsheet and a computer algebra system. Internally both prefer content markup, but by default, both generate presentation markup for output. In the absence of media type negotiation, a likely scenario for an exchange between two systems involves two conversions, content to presentation and back again. With negotiation, the conversions are eliminated. Similarly, a client with a MathML instance in one of the vocabularies might seek a web service that preferred that vocabulary.
MathML is commonly used in compound document settings, e.g. within
HTML, where content is drawn from a variety of sources, and processed
with multiple tools. In these cases, the composition of MathML
expressions generally is not known or at least cannot be guaranteed
by a user agent. Consequently, the application/mathml+xml
type
should be used, as it may be applied to any valid MathML expression.
Since most applications involve data from untrusted sources,
application/mathml+xml
will commonly be appropriate to use as a
default type, and all MathML processors are encouraged to accept it as
a fallback to the more specific formats.
The media types described here may be applied to instances of all versions of MathML. MathML instances do not contain version numbers, so processors and producers must follow the normative backward compatibility behavior.
This registration has been submitted to community review and has been approved by IESG for registration with IANA.
application
mathml+xml
None
Same as charset
parameter of
application/xml
as specified in [RFC7303]
The encoding considerations of application/xml
as specified in
[RFC7303] apply.
As with other XML types and as noted in [RFC7303] section 10, repeated expansion of maliciously constructed XML entities can be used to consume large amounts of memory, which may cause XML processors in constrained environments to fail.
Several MathML elements may cause arbitrary URIs to be referenced. In this case, the security issues of [RFC3986], section 7, should be considered.
In common with HTML, MathML documents may reference external media such as images, style sheets, and scripting languages. Scripting languages are executable content. In this case, the security considerations in the Media Type registrations for those formats shall apply. Similarly, MathML annotation elements may contain content intended for execution or processing. In the case where the processor recognizes and processes the additional content, or where further processing of that content is dispatched to other processors, additional security issues potentially arise. Since the normative semantics of the MathML specifications do not require processing of annotation elements, such issues fall outside the domain of this registration document.
MathML may be used to describe mathematical expressions intended for evaluation in computing systems. Because of the nature of mathematics, a seemingly innocuous expression may lead to a computation which does not terminate or is impractically large. This introduces the risk that computational processors in constrained environments may fail.
In addition, because of the extensibility features for MathML and of
XML in general, it is possible that application/mathml+xml
may describe
content that has security implications beyond those described
here. However, if the processor follows only the normative semantics
of the MathML specifications, this content will be outside the MathML namespace
and shall be ignored.
The MathML specification describes processing semantics that dictate behavior that must be followed when dealing with, among other things, unrecognized elements and attributes, both in the MathML namespace and in other namespaces.
Because MathML is extensible, conformant application/mathml+xml
processors
must expect that content received is well-formed XML, but it cannot be
guaranteed that the content is valid to a particular DTD or Schema or
that the processor will recognize all of the elements and attributes
in the document.
MathML instances do not contain version numbers, so processors and producers must follow the normative backward compatibility behavior described in the MathML specifications.
In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification but constitutes a specification in itself.
Web browsers, rendering engines, formula editors, typesetting software, search robots, computing systems.
Magic number(s): see [RFC7303]
.mml
MathML
MML
public.mathml
conforming to public.xml
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
COMMON
None
The MathML specification and this media-type registration are the products of the World Wide Web Consortium's Math Working Group. The W3C has change control over this media type registration.
This registration has been submitted to community review and has been approved by IESG for registration with IANA.
application
mathml-presentation+xml
None
Same as charset
parameter of
application/xml as specified in [RFC7303]
The considerations of application/xml as specified in [RFC7303] apply.
As with other XML types and as noted in [RFC7303] section 10, repeated expansion of maliciously constructed XML entities can be used to consume large amounts of memory, which may cause XML processors in constrained environments to fail.
Several MathML elements may cause arbitrary URIs to be referenced. In this case, the security issues of [RFC3986], section 7, should be considered.
In common with HTML, MathML documents may reference external media such as images, style sheets, and scripting languages. Scripting languages are executable content. In this case, the security considerations in the Media Type registrations for those formats shall apply. Similarly, MathML annotation elements may contain content intended for execution or processing. In the case where the processor recognizes and processes the additional content, or where further processing of that content is dispatched to other processors, additional security issues potentially arise. Since the normative semantics of the MathML specification do not require processing of annotation elements, such issues fall outside the domain of this registration document.
MathML may be used to describe mathematical expressions intended for evaluation in computing systems. Because of the nature of mathematics, a seemingly innocuous expression may lead to a computation which does not terminate or is impractically large. This introduces the risk that computational processors in constrained environments may fail.
In addition, because of the extensibility features for MathML and of
XML in general, it is possible that application/mathml-presentation+xml
may describe
content that has security implications beyond those described
here. However, if the processor follows only the normative semantics
of the MathML specification, this content will be outside the MathML namespace
and shall be ignored.
The MathML specifications describe processing semantics that dictate behavior that must be followed when dealing with, among other things, unrecognized elements and attributes, both in the MathML namespace and in other namespaces.
Because MathML is extensible, conformant application/mathml-presentation+xml
processors
must expect that content received is well-formed XML, but it cannot be
guaranteed that the content is valid to a particular DTD or Schema or
that the processor will recognize all of the elements and attributes
in the document.
MathML instances do not contain version numbers, so processors and producers must follow the normative backward compatibility behavior described in the MathML specifications.
In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.
This normative text does not record a file extension for the media type
application/mathml-presentation+xml
because we expect tools processing files
with MathML inside to have sufficient information with the generic media-type
(application/mathml+xml
) while other content negotiation forms will take advantage
of specific media-types.
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification but is a free-standing specification.
Web browsers, rendering engines, formula editors, typesetting software, search robots, computing systems.
Magic number(s): see [RFC7303]
None
MathML Presentation
MMLp
public.mathml.presentation
conforming to
public.mathml
(described above) conforming to public.xml
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
COMMON
None
The MathML specification and this normative text are the products of the World Wide Web Consortium's Math Working Group. The W3C has change control over this normative text.
This registration has been submitted to community review and has been approved by IESG for registration with IANA.
application
mathml-content+xml
None
Same as charset
parameter of
application/xml
as specified in [RFC7303]
The encoding considerations of application/xml
as specified in
[RFC7303] apply.
As with other XML types and as noted in [RFC7303] section 10, repeated expansion of maliciously constructed XML entities can be used to consume large amounts of memory, which may cause XML processors in constrained environments to fail.
Several MathML elements may cause arbitrary URIs to be referenced. In this case, the security issues of [RFC3986], section 7, should be considered.
In common with HTML, MathML documents may reference external media such as images, style sheets, and scripting languages. Scripting languages are executable content. In this case, the security considerations in the Media Type registrations for those formats shall apply. Similarly, MathML annotation elements may contain content intended for execution or processing. In the case where the processor recognizes and processes the additional content, or where further processing of that content is dispatched to other processors, additional security issues potentially arise. Since the normative semantics of the MathML specifications do not require processing of annotation elements, such issues fall outside the domain of this registration document.
MathML may be used to describe mathematical expressions intended for evaluation in computing systems. Because of the nature of mathematics, a seemingly innocuous expression may lead to a computation which does not terminate or is impractically large. This introduces the risk that computational processors in constrained environments may fail.
In addition, because of the extensibility features for MathML and of
XML in general, it is possible that application/mathml-content+xml
may describe
content that has security implications beyond those described
here. However, if the processor follows only the normative semantics
of the MathML specifications, this content will be outside the MathML namespace
and shall be ignored.
The MathML specification describes processing semantics that dictate behavior that must be followed when dealing with, among other things, unrecognized elements and attributes, both in the MathML namespace and in other namespaces.
Because MathML is extensible, conformant application/mathml-content+xml
processors
must expect that content received is well-formed XML, but it cannot be
guaranteed that the content is valid to a particular DTD or Schema or
that the processor will recognize all of the elements and attributes
in the document.
MathML instances do not contain version numbers, so processors and producers must follow the normative backward compatibility behavior described in the MathML specifications.
In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.
This normative text does not record a file extension for the media type
application/mathml-content+xml
because we expect tools processing files
with MathML inside to have sufficient information with the generic media-type
(application/mathml+xml
) while other content negotiation forms will take advantage
of specific media-types.
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification but is a free-standing specification.
Formula editors, search robots, computing systems.
Magic number(s): see [RFC7303]
None
MathML Content
MMLc
public.mathml.content
conforming to
public.mathml
(described above) conforming to public.xml
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
COMMON
None
The MathML specification and this normative text are the product of the World Wide Web Consortium's Math Working Group. The W3C has change control over this normative text.