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

Re: [VE][47] A non-empty XHTML page with correct <?xml ... ?> header doesn't get validated at all

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Fri, 16 May 2008 18:50:57 +0300
Message-ID: <022301c8b76c$a23eba30$0500000a@DOCENDO>
To: <www-validator@w3.org>
Cc: "Ewgenij Gawrilow" <gawrilow@math.TU-Berlin.DE>

Andreas Prilop wrote:

> On Fri, 16 May 2008, Ewgenij Gawrilow wrote:
>
>> Validating http://www.math.tu-berlin.de/coga/people/index.xhtml
>> Error [47]: "end of document in prolog"
>
> Your server sends
>
>   Content-Type: application/xhtml+xml
>   Content-Encoding: utf-8
>
> That is wrong.

I missed that one... but technically, utf-8 is the default encoding for 
application/xhtml+xml and the malformed Content-Encoding header should 
be ignored. So there's probably a bug to be fixed in the validator. 
Perhaps it somehow gets I/O error when trying to apply an undefined 
content encoding.

> It must be
>
>   Content-Type: application/xhtml+xml; charset=utf-8

That would indeed be advisable if you wanted to serve a page as XHTML.

> However, what's the point? Serve your pages as text/html if you want
> to publish something on the web.

Surely, but the validator should still be able to handle the situation.

(I'm Cc'ing the OP, since people who post to the www-validator list 
can't be assumed to have subscribed to it.)

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 
Received on Friday, 16 May 2008 15:51:35 GMT

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