70
For MathML to work with Internet Explorer or older versions of Netscape, a plug in mechanism must be used. The
way to do this is explored in the
next section
.
Rendering XHTML and MathML Documents
The previous section showed how to embed MathML into XHTML, creating documents that mix text and mathemat
ics. It also explained that this does not work with browsers that rely on a plug in mechanism. This section shows
how to write documents that will work in a wide range of browsers.
To support MathML in browsers using a plug in mechanism, the document must use special tags that are relevant to
the particular plug in used. If the browser supports MathML natively, then no special tags are needed. Of course, an
author does not want to produce different versions of each document specific to each rendering technology. The
solution is to make use of XSLT stylesheet technology to convert the document in the browser before it is viewed.
This automatically inserts any special tags that are needed for plug ins. An XSLT stylesheet that implements this
solution is available from the W3C Math site, http://www.w3.org/Math/XSL.
Here is a document that uses the MathML stylesheet.
href="http://www.w3.org/Math/XSL/mathml.xsl"?>
Basic XHTML+MathML Document
XHTML+MathML
Here is a math expression.
x
2
This document can be rendered by any browser that is supported by the stylesheet. At the current time this includes
the following:
Windows:
Internet Explorer 6.0 with either the MathPlayer or techexplorer plug in
Internet Explorer 5.5 with either the MathPlayer or techexplorer plug in
Internet Explorer 5.0 with the techexplorer plug in
Netscape 7.0 PR1
Netscape 6.1 with the techexplorer plug in
Amaya (Presentation MathML only)
Mozilla 1.0 (and later)
Macintosh:
.