- This topic has 3 replies, 2 voices, and was last updated 17 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
Dorothy gantenbeinMemberI am using Eclipse 3.2.1 with MyEclipse 5.1.0. I have an xHTML file with MathML. MyEclipse show validation warnings for the math (math, etc unknown tag).
———————————————————————————————————
<?xml version=”1.0″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html” />
<title>Presentation Examples</title>
</head><body>
<h2>Can your browser display Presentation MathML?</h2><p>Below you should see an equation inlined within some text</p>
<p>some text, some text,
<math xmlns=”http://www.w3.org/1998/Math/MathML”>
<mrow>
<msup>
<mfenced open=”[” close=”]”>
<mrow>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</mrow>
</mfenced>
<mn>260</mn>
</msup>
<mo>+</mo>
<msub>
<mfenced open=”{” close=”}”>
<mrow>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</mrow>
</mfenced>
<mi>i</mi>
</msub>
</mrow>
</math>
some text.</p></body>
</html>
Riyad KallaMemberdgantenbein,
The validation is accurate, even though you have defined a name space, the editor and validator have no additional information available from that namespace ot make heads or tails of the tags allowable, so it just doesn’t understand them.This also occurs in other IDEs if you paste that same example into them.
Riyad KallaMemberI did some digging and here is a DTD that you can use for your DOCTYPE that extends XHTML and add MathML support:
http://www.w3.org/TR/MathML/appendixa.html#parsing.module
Riyad KallaMemberHmm interesting, XHTML is a strange spec especially when dealing with language extensions, try this template and see if it helps (note the namespace for mathml):
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html" /> <title>Presentation Examples</title> </head> <body> <h2> Can your browser display Presentation MathML? </h2> <p> Below you should see an equation inlined within some text </p> <p> some text, some text, <m:math xmlns:m="http://www.w3.org/1998/Math/MathML"> <m:mrow> <m:msup> <m:mfenced open="[" close="]"> <m:mrow> <m:mi>a</m:mi> <m:mo>+</m:mo> <m:mi>b</m:mi> </m:mrow> </m:mfenced> <m:mn>260</m:mn> </m:msup> <m:mo>+</m:mo> <m:msub> <m:mfenced open="{" close="}"> <m:mrow> <m:mi>a</m:mi> <m:mo>+</m:mo> <m:mi>b</m:mi> </m:mrow> </m:mfenced> <m:mi>i</m:mi> </m:msub> </m:mrow> </m:math> some text. </p> </body> </html>
-
AuthorPosts