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. It will be submitted to the IESG for review,
approval, and registration with IANA.

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 presenation 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 presenation markup.

"application/mathml-content+xml"

MathML insistances 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
expressionss 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 is for community review and will be submitted
to the IESG for review, approval, and 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
enviroments 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.

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 is for community review and will be submitted to
the IESG for review, approval, and 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
enviroments 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.

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 is for community review and will be submitted to
the IESG for review, approval, and 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
enviroments 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.