...

View Full Version : Validation changed



toplisek
05-28-2010, 12:13 PM
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 :




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

abduraooft
05-28-2010, 12:30 PM
Code is : Can we have a link?

toplisek
05-28-2010, 12:53 PM
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
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">

tomws
05-28-2010, 02:23 PM
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.

abduraooft
05-28-2010, 02:50 PM
Yeah, after all it's HTML validator and not for PHP :)

Apostropartheid
05-28-2010, 03:07 PM
Giving us the link would be really helpful.

Scriptet
05-28-2010, 08:18 PM
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..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum