Sample xHTML/MathML document

Here is a sample xHTML/MathML document.

demo-mathml.xhtml


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
    "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example of xHTML/MathML file</title>
</head>
<body>
<h1>Example of an xHTML file with MathML contents</h1>
<p>Here is a mathematical expression, embed in this xHTML page:<br/>
<span style="font-size:xx-large;">
  <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
    <mfrac>
      <mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>
      <mrow><mi>x</mi><mo>-</mo><mn>1</mn></mrow>
    </mfrac>
  </math></span>
</p>
<hr/>
</body>
</html>

Feel free to copy it and to use it as a template. To be sure the file will be sent with the correct mime type, ensure you use the « .xhtml » or the « .xht » extension.

Trackbacks & Pings

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *