This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
After trying numerous examples from the web, wondering if this is a bug. <!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"; xmlns:m="http://www.w3.org/1998/Math/MathML"> <head> <title> Using XHTML and MathML Together </title> </head> <body> <center> <h1> Using XHTML and MathML Together </h1> </center> <br/> Consider the equation <m:math> <m:mfrac> <m:mi>a</m:mi> <m:mn>2</m:mn> </m:mfrac> </m:math> <br/> What, you may ask, are this equation's roots? </body> </html> If one tries to validate with a namespace, the validator never seems to accept mathml namespace. Note: numerous examples were tried from numerous sources, all failed. Yes, possible all were incorrect, since MathML is very new :(
The DTD used for this xhtml+mathml profile is rather limited, because it's not really namespace aware. You may have more luck copying the example from the spec: http://www.w3.org/TR/XHTMLplusMathMLplusSVG/sample.xhtml
(In reply to comment #1) > The DTD used for this xhtml+mathml profile is rather limited, because it's not > really namespace aware. > > You may have more luck copying the example from the spec: > http://www.w3.org/TR/XHTMLplusMathMLplusSVG/sample.xhtml > Perfect example...and it shows the problem: <p>Math expression in display style:</p> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mfrac> <mi>a</mi> <mn>2</mn> </mfrac> </math> <h2 id="svg">SVG sample</h2> <p> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="10cm" height="8cm" viewBox="0 0 500 400" version="1.1"> <svg:title>A star</svg:title> <svg:polygon style="fill:red; stroke:blue; stroke-width:10" points="210,46 227,96 281,97 238,129 254,181 210,150 166,181 182,129 139,97 193,97"/> </svg:svg> </p> <h2 id="math_w_namespace">Math with namespace, same as above</h2> <p> <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"> <m:mfrac> <m:mi>a</m:mi> <m:mn>2</m:mn> </m:mfrac> </m:math> </p> The first example with math works w/o a namespace prefix. The second example with svg works with namespace prefix. The last example with math does not work when using namespace prefix???