[Sussex] Strange error when checking html with W3C validate

Gareth Ablett Gareth.Ablett at itpserve.co.uk
Wed Jul 13 08:53:39 UTC 2005


 From: John D. [mailto:john at johnsemail.eclipse.co.uk]
 Subject: Re: [Sussex] Strange error when checking html with W3C
validator
> 
> 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?
> 

I may be wrong on certain parts here but this is what I do;
The DOCTYPE is always the first line so swap the xml and the DOCTYPE
around, also I hope those excessive *'s are part of the validators
display.

I gather you use the validator in the way to upload the file your best
bet is to upload the file to some webspace and use the link to validate
the page that way regardless of the browser it should get the same
result.

Gareth Ablett
Systems Developer

ITP Services Ltd.
http://www.itpserve.co.uk/

------------------------------------------------------------------------
The recipient acknowledges that ITP Services Ltd is unable to control
the content of information in transmitting mail and attachments over the
Internet. ITP Services Ltd makes no warranty as to the quality,
accuracy and content of information contained in or with this message.
In
reading, opening or receiving this e-mail the recipient accepts full
responsibility for its content and attachments. 




More information about the Sussex mailing list