xmlns query for mathml

J

Jon Thackray

I'm trying to use the MathML DTD and stylesheets, but get some
problems with xmlns attributes. If I do something like

<math xmlns="http://...">
....
</math>

then xmllint and xalan in validating mode both complain that math
doesn't have an xmlns attribute. If I leave out the attribute, then
the Mathml stylesheet doesn't format the Mathml content using either
xalan or saxon.

Is the Mathml dtd wrong, or is there something else I should be doing?
 
J

Jon Thackray

David Carlisle said:
The MathML DTD declares xmlns as an attribute so you presumably have a
very old copy. MathML1 predates the XML Namespace Rec so not surprisingly
the very early versions did not declare xmlns.

the current DTD is (always) available from

http://www.w3.org/Math/DTD

in particular

http://www.w3.org/Math/DTD/mathml2/mathml2.dtd

Thanks, that works great, although I notice the "standalone" dtd isn't
very standalone. However, the tgz file does the job fine. I'm also
having a little trouble with the corresponding stylesheet (which I got
from http://www.w3.org/Math//XSL). I have a fragment such as

<math
xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<munderover>
<mo>&product;</mo>
<mi>i=1</mi>
<mi>r</mi>
</munderover>
<mi>p</mi>
</mrow>
</math>

which I think should display a product (looking like a capital pi)
with i=1 underneath, r on top, and p to the right of it (used to be p
indexed by i, but I cut that out trying to simplify the problem). What
I actually get is the munderover part ok, but on a line on its own
with the p on the next line. The html that comes out of the stylesheet
is as below (I'm using pmathmlcss.xsl inside mathml.xsl, with output
method html). IE version 6 and Mozilla (from RH7.3) both display it
the same way, so I'm assuming the output markup must be wrong. Any
suggestions?

<span xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:doc="http://www.dcarlisle.demon.co.uk/xsldoc" xmlns:x="data:,x"
id="N0x807e340.0x83082a0" class="mrow"><span id="N0x807e340.0x83082d8"
class="mrow">
<table class="munderover">
<tr>
<td><span class="mi1">r</span></td>
</tr>
<tr>
<td><span id="N0x807e340.0x8308348" class="mo">&prod;</span></td>
</tr>
<tr>
<td><span class="mi">i=1</span></td>
</tr>
</table>
<span class="mi1">p</span></span></span>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top