B Media Types Registrations

Overview: Mathematical Markup Language (MathML) Version 3.0
Previous: A Parsing MathML
Next: C Operator Dictionary

B Media Types Registrations
    B.1 Selection of Media Types for MathML Instances
    B.2 Media type for Generic MathML
    B.3 Media type for Presentation MathML
    B.4 Media type for Content MathML

This normative appendix 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.

B.1 Selection of Media Types for MathML Instances

MathML contains two distinct vocabularies. Presentation markup is for encoding visual presentation, and consists of the elements defined in Chapter 3 Presentation Markup. Content markup is for encoding mathematical meaning, and consists of the elements defined in Chapter 4 Content Markup. 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 up to and including MathML 3. MathML instances do not contain version numbers, so processors and producers must follow the normative backward compatibility behavior described in this specification.

B.2 Media type for Generic MathML

This registration has been submitted to community review and has been approved by IESG for registration with IANA.

Type name
application
Subtype name
mathml+xml
Required parameters
None
Optional parameters
Same as charset parameter of application/xml as specified in [RFC3023]
Encoding considerations

The encoding considerations of application/xml as specified in [RFC3023] apply.

MathML documents may be transmitted in compressed form using gzip compression. For systems which employ MIME-like mechanisms, such as HTTP, this is indicated by the Content-Transfer-Encoding header; for systems which do not, such as direct filesystem access, this is indicated by the filename extension and by the Macintosh File Type Codes. In addition, gzip compressed content is readily recognised by the initial byte sequence as described in [RFC1952] section 2.3.1.

Security considerations

As with other XML types and as noted in [RFC3023] 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 this 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+xml" may describe content that has security implications beyond those described here. However, if the processor follows only the normative semantics of this specification, this content will be outside the MathML namespace and shall be ignored.

Interoperability considerations

This 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 this specification.

In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.

Published specification
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification.
Applications that use this media type
Web browsers, rendering engines, formula editors, typesetting software, search robots, computing systems.
Additional information
Magic number(s): see [RFC3023]
File extension(s):
.mml
Windows Clipboard Name:
MathML
Macintosh file type code(s)
MML
Macintosh Universal Type Identifier code
public.mathml conforming to public.xml
Person & email address to contact for further information
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
Intended usage
COMMON
Restrictions on usage
None
Author and Change controller
The MathML specification is the product of the World Wide Web Consortium's Math Working Group. The W3C has change control over this specification.

B.3 Media type for Presentation MathML

This registration has been submitted to community review and has been approved by IESG for registration with IANA.

Type name
application
Subtype name
mathml-presentation+xml
Required parameters
None
Optional parameters
Same as charset parameter of application/xml as specified in [RFC3023]
Encoding considerations

The considerations of application/xml as specified in [RFC3023] apply.

MathML documents may be transmitted in compressed form using gzip compression. For systems which employ MIME-like mechanisms, such as HTTP, this is indicated by the Content-Transfer-Encoding header; for systems which do not, such as direct filesystem access, this is indicated by the filename extension and by the Macintosh File Type Codes. In addition, gzip compressed content is readily recognised by the initial byte sequence as described in [RFC1952] section 2.3.1.

Security considerations

As with other XML types and as noted in [RFC3023] 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 this 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 this specification, this content will be outside the MathML namespace and shall be ignored.

Interoperability considerations

This 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-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 this specification.

In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.

This specification 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.

Published specification
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification.
Applications that use this media type
Web browsers, rendering engines, formula editors, typesetting software, search robots, computing systems.
Additional information
Magic number(s): see [RFC3023]
File extension(s):
None
Windows Clipboard Name:
MathML Presentation
Macintosh file type code(s)
MMLp
Macintosh Universal Type Identifier code
public.mathml.presentation conforming to public.mathml (described above) conforming to public.xml
Person & email address to contact for further information
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
Intended usage
COMMON
Restrictions on usage
None
Author and Change controller
The MathML specification is the product of the World Wide Web Consortium's Math Working Group. The W3C has change control over this specification.

B.4 Media type for Content MathML

This registration has been submitted to community review and has been approved by IESG for registration with IANA.

Type name
application
Subtype name
mathml-content+xml
Required parameters
None
Optional parameters
Same as charset parameter of application/xml as specified in [RFC3023]
Encoding considerations

The encoding considerations of application/xml as specified in [RFC3023] apply.

MathML documents may be transmitted in compressed form using gzip compression. For systems which employ MIME-like mechanisms, such as HTTP, this is indicated by the Content-Transfer-Encoding header; for systems which do not, such as direct filesystem access, this is indicated by the filename extension and by the Macintosh File Type Codes. In addition, gzip compressed content is readily recognised by the initial byte sequence as described in [RFC1952] section 2.3.1.

Security considerations

As with other XML types and as noted in [RFC3023] 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 this 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-content+xml" may describe content that has security implications beyond those described here. However, if the processor follows only the normative semantics of this specification, this content will be outside the MathML namespace and shall be ignored.

Interoperability considerations

This 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 this specification.

In computational contexts, the result of evaluating a MathML expression is system-specific, and is not guaranteed to be interoperable between systems.

This specification 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.

Published specification
This media type registration is extracted from Appendix B of the Mathematical Markup Language (MathML) Version 3. specification.
Applications that use this media type
Formula editors, search robots, computing systems.
Additional information
Magic number(s): see [RFC3023]
File extension(s):
None
Windows Clipboard Name:
MathML Content
Macintosh file type code(s)
MMLc
Macintosh Universal Type Identifier code
public.mathml.content conforming to public.mathml (described above) conforming to public.xml
Person & email address to contact for further information
Paul Libbrecht (member-math@w3.org). See the W3C Math Working Group home page for more information.
Intended usage
COMMON
Restrictions on usage
None
Author and Change controller
The MathML specification is the product of the World Wide Web Consortium's Math Working Group. The W3C has change control over this specification.
Overview: Mathematical Markup Language (MathML) Version 3.0
Previous: A Parsing MathML
Next: C Operator Dictionary