facebook

Validation Warnings with MathML

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #265697 Reply

    I 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”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;
    <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”&gt;
    <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>

    #265742 Reply

    Riyad Kalla
    Member

    dgantenbein,
    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.

    #265743 Reply

    Riyad Kalla
    Member

    I 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

    #265752 Reply

    Riyad Kalla
    Member

    Hmm 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>
    
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Validation Warnings with MathML

You must be logged in to post in the forum log in