XML Namespaces

XHTML and MathML

Define prefix and namespace URI binding and default namespace:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:mml="http://www.w3.org/1998/Math/MathML">

Use MathML inline in XHTML document:

<p>In order to mix XHTML and MathML, we need to include the proper DTD and also pay attention to XML namespaces!</p>
<mml:math>
  <mml:mtext>The roots of the quadratic equation</mml:mtext>
  <mml:mspace width="2em"/>
  <mml:mi>a</mml:mi>
  <mml:mo>&InvisibleTimes;</mml:mo>
  <mml:msup>
  <!-- content removed for clarity -->

Copyright © 2002-2009 David P. Heitmeyer

Bookmark and Share