XHTML 1.1 + MathML 2.0 DTD and namespacing

by "Alexander J. Vincent" <jscript(at)pacbell.net>

 Date:  Fri, 19 Oct 2001 19:52:07 -0700
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
I've constructed the following XHTML 1.1 + MathML 2.0 document, in
accordance with MathML 2.0's experimental DTD.  But I wonder about the
correct usage of the xmlns attribute.  The W3C Validator is rejecting
xmlns:math occurring in the html element, but likes it in the math:math
element.  As I understand it, xmlns:math would be a valid attribute of the
root html element, and is preferred there to prevent redundancy in multiple
MathML document fragments.  Would moving the xmlns:math attribute to the
html element be appropriate?

<?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" [
               <!ENTITY % MATHML.prefixed "INCLUDE" >
               <!ENTITY % MATHML.prefix   "math" >]
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<p>The quadratic formula is
<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
  <math:mi>y</math:mi>
  <math:mo>=</math:mo>
  <math:mi>a</math:mi>
  <math:mrow>
    <math:mo>(</math:mo>
    <math:msup>
      <math:mi>x</math:mi>
      <math:mn>2</math:mn>
    </math:msup>
    <math:mo>)</math:mo>
  </math:mrow>
  <math:mo>+</math:mo>
  <math:mi>b</math:mi>
  <math:mrow>
    <math:mo>(</math:mo>
    <math:mi>x</math:mi>
    <math:mo>)</math:mo>
  </math:mrow>
  <math:mo>+</math:mo>
  <math:mi>c</math:mi>
</math:math>
</p>
</body>
</html>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.