This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5570 - mathml and namespaces
Summary: mathml and namespaces
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-13 21:13 UTC by pjm
Modified: 2008-03-14 13:12 UTC (History)
0 users

See Also:


Attachments

Description pjm 2008-03-13 21:13:05 UTC
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 :(
Comment 1 Olivier Thereaux 2008-03-14 02:29:00 UTC
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
Comment 2 pjm 2008-03-14 13:12:16 UTC
(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???