Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    216
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Validation changed

    I have noticed that some time ago websites were validated but after some time it shows bunch of errors. What does it mean PROLOG as it is COPY PASTE from validator website...

    Let us see one error:
    What is wrong with my validated code as correct code shows errors like:
    Line 1, Column 1: character "" not allowed in prolog

    <!DOCTYPE html


    Code is :

    PHP Code:

    <!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" 

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Code is :
    Can we have a link?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    May 2006
    Posts
    216
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Seems validator has issue as it reports error on the same validation page.

    I have tested. I think validator has bug. They notice PHP language script if you put ABOVE DOCTYPE.

    Example when you can check such bug is:

    PHP Code:
    <?PHP
    error_reporting
    (0);
    @require_once(
    "myphpfile.php");

    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    It will be two errors even simple webpage:
    1. ERROR:
    Line 1, Column 1: character "" not allowed in prolog

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3…

    2. ERROR:
    Line 1, Column 3: Start tag expected, '<' not found

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3…

    So two errors even validator should not notice PHP script and specially not post '<' not found

    I'm not sure if this was correct but simple test...

    If you see source code is 100% perfect:
    <!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" xml:lang="en" lang="en">

  • #4
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    Quote Originally Posted by toplisek View Post
    I have tested. I think validator has bug. They notice PHP language script if you put ABOVE DOCTYPE.
    You have not discovered a bug in the w3c validator. And that validator can't "see" php if your server is configured and working properly. If you will provide a link as abduraooft requested, your problem would be solved.
    Are you a Help Vampire?

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Yeah, after all it's HTML validator and not for PHP
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Giving us the link would be really helpful.

  • #7
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    I think it's some data before that's been saved onto the file, what editor do you use and make sure you are just saving it in the correct format, then re-upload the file and test. But it could be for other reasons so as everybody else has said, the link is the way forward my friend..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •