Xhtml Validation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Xhtml Validation

    I have
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
    //header("Content-type: application/vnd.wap.xhtml+xml");
    header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1
    header("Pragma: no-cache");
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?php</div>
    at the top of my page and then i have my main page start like the following
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>if($action=="main")
    {
    addvisitor();
    addonline(getuid_sid($sid),"Main Menu","index.php?action=$action");
    $nick = getnick_sid($sid);
    echo "<head>";
    echo "<title>$nick@$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";</div>
    I used w3c validator and got 5 errors, 3 of which are xml parsing errors
    I am loosing people visiting my site coz their browser goes bust when they try to access my index.php
    I will detail the errors in the consecutive post
    tinyurl.com/earnbymobile
    Easy earning for Indians
    ---------------------
    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
    goo.gl/6vub3

    #2
    the first error is
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'># Error Line 2, Column 119: end tag for "link" omitted, but OMITTAG NO was specified.

    …ef="../themes/blue_medium.css"></head><body><div><img src="../images/logo.gif

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
    </div>

    the second is
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>Error Line 2, Column 216: there is no attribute "align".

    …3:55 - Wed 25th Feb 09</div><p align="center">Welcome back admin
    [b]FO</div>
    w3cvalidator says You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    further .. the third error is
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>Line 2, Column > 80: XML Parsing Error: Opening and ending tag mismatch: link line 2 and head.

    …ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…</div>
    tinyurl.com/earnbymobile
    Easy earning for Indians
    ---------------------
    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
    goo.gl/6vub3

    Comment


      #3
      lastly the fourth and the fifth are
      <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>Line 2, Column > 80: XML Parsing Error: Opening and ending tag mismatch: head line 2 and html.

      …ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…


      Line 2, Column > 80: XML Parsing Error: Premature end of data in tag html line 1.

      …ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…</div>

      Sorry for putting up this lengthy description, But the eroors are very confusing. Getting an eroor for something which is supposed to be correct is strange .. or maybe its not correct. Please help me get rid of those and if anybody knows then plz guide me as to where should i put the html compression code ??? I know its boring and annoying to read all this but plz help me out with this
      tinyurl.com/earnbymobile
      Easy earning for Indians
      ---------------------
      Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
      goo.gl/6vub3

      Comment


        #4
        see this !!

        Code:
         echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\"/>";
        You didnt close the link try now with that.
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          that just did the magic bro... thank you very much. My 5 validation errors are now reduced to 1. so what should i do now ??
          the validator is asking me to change my headers to transitional document type. Will that give any problem ?? And how can i use cache to save loading time ? hope am not bugging you for too much .. reducing 5 errors to 1 error was already a big accomplishment .. thanks
          tinyurl.com/earnbymobile
          Easy earning for Indians
          ---------------------
          Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
          goo.gl/6vub3

          Comment


            #6
            Dont use
            or
            or


            do this when you wont the script to to use


            Do this

            <div> Hello world!! </div>


            that will pass
            Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
            Visit: WapMasterz Coming Back Soon!
            _______
            SCRIPTS FOR SALE BY SUBZERO
            Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
            FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
            _______
            Info & Tips
            php.net
            w3schools.com

            Comment


              #7
              also dont use <p align="center"> </p> use <div style="text-align: left"> </div>

              Only use cache on a site that is not chat or forums or sql that users and you use inputs etc

              only use cache as like download and index where ppl see it then cut the cache when they login..

              header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
              header("Cache-Control: no-cache");
              header("Pragma: no-cache");

              or

              <meta http-equiv="Cache-Control" content="no-cache"/>
              <meta http-equiv="Cache-Control" content="max-age=0"/>
              <meta http-equiv="Cache-Control" content="must-revalidate"/>
              Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
              Visit: WapMasterz Coming Back Soon!
              _______
              SCRIPTS FOR SALE BY SUBZERO
              Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
              FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
              _______
              Info & Tips
              php.net
              w3schools.com

              Comment


                #8
                Thanks Sub all your suggestions helped and was able to clear one action page .. but now got problem on main page
                xml parsing error and 8 errors on validator
                <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>/////////////////////////Main Page Here
                echo "<head>";
                echo "<title>$sitename</title>";
                echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\"/>";
                echo "<link rel=\"shortcut icon\" href=\"web/favicon.ico\" type=\"image/x-icon\"/>\n";
                echo "</head>";
                echo "<body>";
                echo "<div><img src=\"../images/logo.gif\" alt=\"\"/>
                ";
                $now = time();
                $time = time() + (7 * 30 * 60);
                $newtime = date("H:i",$time);
                $date = strtotime(&#39;-12 hours&#39;);
                $newdate = date(&#39;D jS M y&#39;,$date);
                echo "".$newtime." - ".$newdate."</div>";
                echo "<p align=\"center\">";
                echo "Welcome to $sitename Community, please Feel Free To Browse and invite all your friends ;o)</p>";
                echo "<p align=\"center\">wap2.0/xhtml
                works with any pc browser n most mobiles</p>";
                echo "<form action=\"login.php\" method=\"get\"><p align=\"center\">";
                echo "Username:
                <input align=\"center\" name=\"loguid\" size=\"12\" maxlength=\"12\"/>
                ";
                echo "Password:
                <input align=\"center\" type=\"password\" name=\"logpwd\" size=\"10\" maxlength=\"10\"/>
                ";
                echo "<input type=\"submit\" value=\"Login!\"></p></form>";
                echo "<p align=\"center\">";
                echo "<a href=\"index.php?action=gforumindx\">***Guest Access***</a>
                ";
                echo "<a href=\"..mail/mail.php?action=sende\">!!!SEND INSTANT-MAIL TO SITE ADMIN!!!</a>
                ";
                echo "
                Not registered yet?
                <a href=\"register.php\">Register</a>
                ";
                echo "
                <a href=\"index.php?action=terms&amp;sid=$sid\">Site Rules</a>
                ";
                echo "<a href=\"http://surfwap.com/?site=rock0n\">SurfWap</a>
                ";
                echo "</p>";
                echo "<p align=\"center\">";
                $onu = getnumonline()+10;
                echo "Members Inside: $onu

                ";
                echo "<a href=\"../wap/index.php\">Wap 1.0(wml) Version</a></p>";
                echo "<div>©2007
                $sitename
                </div>";
                echo "</body>";</div>
                If you are able to suggest then it be really wonderful, else i guess i will have to learn implementing xhtml with php
                tinyurl.com/earnbymobile
                Easy earning for Indians
                ---------------------
                Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
                goo.gl/6vub3

                Comment


                  #9
                  try not to use <p align=\"center\"> use this <div style=\"text-align: center\"> and remember to change </p> to </div>
                  Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                  Visit: WapMasterz Coming Back Soon!
                  _______
                  SCRIPTS FOR SALE BY SUBZERO
                  Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                  FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                  _______
                  Info & Tips
                  php.net
                  w3schools.com

                  Comment


                    #10
                    wont that have implications with my css ?? coz bro my css is supposed to render everyting in div to a certain colour.... that would just mess the look completely ... aint there any other way out ? why does xhtml has to this harsh ?
                    tinyurl.com/earnbymobile
                    Easy earning for Indians
                    ---------------------
                    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
                    goo.gl/6vub3

                    Comment


                      #11
                      no it wont do any just align it thats all

                      its like <p do
                      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                      Visit: WapMasterz Coming Back Soon!
                      _______
                      SCRIPTS FOR SALE BY SUBZERO
                      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                      _______
                      Info & Tips
                      php.net
                      w3schools.com

                      Comment


                        #12
                        Thanks for all the help sub ...
                        tinyurl.com/earnbymobile
                        Easy earning for Indians
                        ---------------------
                        Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
                        goo.gl/6vub3

                        Comment


                          #13
                          all passed ??
                          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                          Visit: WapMasterz Coming Back Soon!
                          _______
                          SCRIPTS FOR SALE BY SUBZERO
                          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                          _______
                          Info & Tips
                          php.net
                          w3schools.com

                          Comment


                            #14
                            ya all passed but this script is a mess bro. It takes hours to correct everything ... its rather a data entry operator work than building a script .... way too tiresome. Didnt know that xhtml validation was that really strict.
                            tinyurl.com/earnbymobile
                            Easy earning for Indians
                            ---------------------
                            Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
                            goo.gl/6vub3

                            Comment


                              #15
                              my site taken me 1 month to now how it is lol

                              its made so clear that i didnt miss any holes or make them lol
                              Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                              Visit: WapMasterz Coming Back Soon!
                              _______
                              SCRIPTS FOR SALE BY SUBZERO
                              Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                              FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                              _______
                              Info & Tips
                              php.net
                              w3schools.com

                              Comment

                              Working...
                              X