W3C home > Mailing lists > Public > www-validator@w3.org > March 2008

Re: Whats wrong with W3C Validator?

From: Robin Daugherty <robin@robindaugherty.net>
Date: Thu, 20 Mar 2008 01:41:56 -0700
Cc: www-validator@w3.org
Message-Id: <D44F7E3E-2602-469A-AAB6-F7B0117F9F86@robindaugherty.net>
To: Otto <w3c@lmen.net>
Otto,

The doctype declaration must be at the top of the document, and can  
only be preceded by whitespace to be valid.

Blocks of PHP code should cause the validator to fail, not only  
because the PHP open and close tags are not valid HTML, but also  
because the PHP block may contain characters that are not valid in HTML.

In addition, the contents of your document may be very different once  
PHP has processed it.  So validating the document in its raw form is  
not a real test of its validity.

Robin Daugherty
robin@robindaugherty.net
1-513-252-2426

http://robindaugherty.net

On Mar 19, 2008, at 4:19 PM, Otto wrote:

>
> Good evening,
>
> I got the same error message like described in the mail of Jozef
> Rusn?<jozef@boberdoo.com>  from Date: Tue, 18 Mar 2008 10:14:24 +0100
>
> The reason for this is obviously a change in W3C Validator about PHP
> in XHTML.
>
> I checked usually my files via file-upload, so the php-code is still
> in the file.
>
> The first lines of all my XHTML-files are:
>
> <?php
> include (//XXXXXXXXX);
> ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd 
> ">
>
> In the past W3C-Validator ignored the <?php ... ?> and checked only  
> the rest. From Today all my files are marked in error with the same  
> error message:
>
> ,----- [  ]
> |     This page is *not* Valid (no Doctype found)!
> |
> | Validation Output: 1 Error Error /Line 1, Column 0/: end of  
> document in
> | prolog.
> `-----
>
> If the files are checked via an URI, all is fine!
>
>
> Regards
>
> Otto
>
>
>
>



Received on Thursday, 20 March 2008 08:42:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:28 GMT