[Sussex] Strange error when checking html with W3C validator

John D. john at johnsemail.eclipse.co.uk
Wed Jul 13 08:35:35 UTC 2005


Ronan Chilvers wrote:
>On Wed, 13 Jul 2005 07:38:29 +0100
>Geoff Teale <tealeg at member.fsf.org> wrote:
>
>  
>>On Wednesday 13 July 2005 00:24, John D. wrote:
>>----------- %< -----------
>>    
>>>So what am I doing wrong? Surely if the html/xhtml is valid (for the
>>>W3C) then it should also be correct for both browsers?
>>>      
>>It sounds more likely that Opera simply isn't giving all the
>>information it should when uploading the file to the validator - that
>>is it's not telling the validator about the character encoding of the
>>file.  You can actually specify the character encoding in the
>>document itself, which may  get round the problem.  It does sound
>>sort of like the problem is Opera however and you should just press
>>on with firefox. 
>>
>>    
>
>Agreed.  Maybe a quicker way to sanitise your code would be to use
>Tidy? (http://tidy.sourceforge.net).  If you're a PHPer you can call
>libtidy functions directly from PHP and use output buffering to sanitise
>your HTML source code on the fly (although not very advisable unless you
>have a caching mechanism of some sort).
I have tidy installed and as far as I can see it just has to be 
selected/checked as an option too work (which it is). PHP? (Whooosh - as 
it goes flying straight over my head! :-) )


Geoff Teale wrote:
>On Wednesday 13 July 2005 00:24, John D. wrote:
>----------- %< -----------
>  
>>So what am I doing wrong? Surely if the html/xhtml is valid (for the
>>W3C) then it should also be correct for both browsers?
>>    
>
>It sounds more likely that Opera simply isn't giving all the information it 
>should when uploading the file to the validator - that is it's not telling 
>the validator about the character encoding of the file.  You can actually 
>specify the character encoding in the document itself, which may  get round 
>the problem.  It does sound sort of like the problem is Opera however and you 
>should just press on with firefox. 
>  
I was just double, double checking and also tried konqueror as well, and 
when the validator page is use in that, it's spitting out the same error 
as when I use Opera.

Google chucks out a couple of possibles, but I don't follow what the 
validator means by "prolog"? i.e. whether it's referring to the xml 
declaration or the DTD (or both?). As far as I can see, the

*<?xml* version="1.0" encoding="iso-8859-1" *?>*
*<!DOCTYPE *html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"*>*
*<html* xmlns="http://www.w3.org/1999/xhtml"*>

coding looks correct - the only thing is that the <!DOCTYPE and > ending parts of the DTD are being highlighted in brown (which I doubt shows up in my post)
and I'm wondering if thats giving me any clues? I can't think of what else too look at?

regards

John D.
*






More information about the Sussex mailing list