Help with W3C page validation - xhtml-mp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theoriginals
    New Member
    • May 2007
    • 8

    Help with W3C page validation - xhtml-mp

    I'm trying to build a mobile site (xhtml-mp) but cant get it to validate:

    Can somebody advise me what to do with these errors? (From W3C)

    1. Unknown Parse Mode!

    2. Byte-Order Mark found in UTF-8 File.

    3. character data is not allowed here.

    The last one worries me because if I remove the entire line of code, the error jumps elsewhere.

    I've Googled these all day and still no luck.

    Thanks a lot,

    The Originals

    [PHP]<?php
    echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
    ?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "(URL address blocked: See forum rules)" >
    <html>
    <head>
    <meta http-equiv="Cache-Control" content="max-age=200" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="(URL address blocked: See forum rules)" rel="stylesheet " type="text/css" />
    <title>The Originals Mobile Blog</title>
    </head>
    <body>
    <div class="containe r">
    <p class="marquee" >content goes here</p>
    </div>
    </body>
    </html>
    [/PHP]
  • kestrel
    Recognized Expert Top Contributor
    • Jul 2006
    • 1071

    #2
    what validator are you using? link?

    Comment

    • theoriginals
      New Member
      • May 2007
      • 8

      #3
      I'm using the W3C page validator - Sorry I didn't know I was allowed to put links in my post ;)

      Here are the results:



      BTW I've changed the markup since my initial posting and am now only getting an "Unknown Parse Mode!" error.

      The current markup passes the .mobi validation, which was my original goal, but I'd really like to understand, and correct the W3C error:

      Thanks,

      Matthew

      Comment

      • RedSon
        Recognized Expert Expert
        • Jan 2007
        • 4980

        #4
        Originally posted by theoriginals
        I'm trying to build a mobile site (xhtml-mp) but cant get it to validate:

        Can somebody advise me what to do with these errors? (From W3C)

        1. Unknown Parse Mode!

        2. Byte-Order Mark found in UTF-8 File.

        3. character data is not allowed here.

        The last one worries me because if I remove the entire line of code, the error jumps elsewhere.

        I've Googled these all day and still no luck.

        Thanks a lot,

        The Originals

        [PHP]<?php
        echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
        ?>
        <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "(URL address blocked: See forum rules)" >
        <html>
        <head>
        <meta http-equiv="Cache-Control" content="max-age=200" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="(URL address blocked: See forum rules)" rel="stylesheet " type="text/css" />
        <title>The Originals Mobile Blog</title>
        </head>
        <body>
        <div class="containe r">
        <p class="marquee" >content goes here</p>
        </div>
        </body>
        </html>
        [/PHP]
        Does the validator give you a line number? If not you should try to comment out everything in your code except for the very very basic tags. Then run the validator. If that passes then uncomment another tag, run the validator again. Continue this process untill you can isolate which tag or line is causing the error. That will give you a better chance to debug it.

        Comment

        • kestrel
          Recognized Expert Top Contributor
          • Jul 2006
          • 1071

          #5
          well, the unknown parse mode isnt the actual error
          its the character data is not allowed here error thats failing your site.
          Its saying that > isnt allowed to appear where it is, it could be a doctype problem, but im not seeing why it's receiving an error.

          Comment

          • theoriginals
            New Member
            • May 2007
            • 8

            #6
            Hi there RedSon & Kestrel,

            Thanks for the advice

            RS: I've tried reducing the document to the xhtml skeleton <html><head><ti tle><body> but I'm still getting the unknown parse mode error.

            K: Do you think that the error might have something to do with the Byte-Order Mark? I've read a few treads on this subject, but still confused as to how to get rid of it. I'm writing the code with SciTE and setting the document encoding with that.

            The mark up passes the .mobi validation with no problem, but I'm keen to understand the error, so I can avoid it in the future.

            Any thoughts?

            Matthew

            Comment

            • kestrel
              Recognized Expert Top Contributor
              • Jul 2006
              • 1071

              #7
              to be completely honest. i cant figure out what the error is. Ive looked over the code and what not, and i have no idea. Sorry man.

              Comment

              • primaryw
                New Member
                • May 2007
                • 1

                #8
                You're using the Validator on a site that isn't really using a W3C standard profile. Hence, odd results.

                XHMLT-MP isn't in the W3C Validator's repertoire. It's crapping out cause it's clueless how to handle what you're feeding it.

                Comment

                • kestrel
                  Recognized Expert Top Contributor
                  • Jul 2006
                  • 1071

                  #9
                  as good an answer as any

                  Comment

                  Working...