W3C home > Mailing lists > Public > www-validator@w3.org > July 2010

Re: Bugs in XHTML validator

From: Matej Lednár <itnews@mldgroup.com>
Date: Thu, 15 Jul 2010 11:42:47 +0200
Message-ID: <4C3ED817.4040301@mldgroup.com>
To: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
CC: www-validator@w3.org

Check this example

<?xml version="1.0" encoding="windows-1250"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head><title>Dokument XHTML</title></head>
<body>
<div>Text v dokumente XHTML.</div>
</body>
</html>

output

<?xml version="1.0" encoding="UTF-8"?><!-- <?xml version="1.0" 
encoding="windows-1250"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head><title>Dokument XHTML</title></head>
<body>
<div>Text v dokumente XHTML.</div>
</body>
</html>

This is not correct output.
<?xml version="1.0" encoding="UTF-8"?><!-- <?xml version="1.0" 
encoding="windows-1250"?> -->


Now white space at the end of xml declaration doesnt make error (It 
looks like fixed).

I am using validators several years even every day. The white space bug 
in XML declaration was in past too.

I have noticed for it several months ago and this bug was fixed. 
Yesterday appeared again.

The XML declaration problem still continue (Validator creating comment 
and add XML declaration with UTF-8).


PhDr. Matej Lednár




Dňa 15. 7. 2010 8:12, Benjamin Hawkes-Lewis wrote / napísal(a):
> On 14 Jul 2010, at 11:46, Matej Lednár wrote:
>> I can use only<?xml version="1.0" encoding="windows-1250" ?>
>> no
>> <?xml version="1.0" encoding="windows-1250"?>
>> look at ending chars - space between encoding and ?>.
> Cannot reproduce. The validator says the following direct input is valid:
>
>      <?xml version="1.0" encoding="windows-1250"?>
>      <!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">
>      <head>
>      <title></title>	
>      </head>
>      <body>
>      </body>
>      </html>
>
>> If I use
>> <?xml version="1.0" encoding="windows-1250" ?>
>>
>> result is
>>
>> <?xml version="1.0" encoding="UTF-8" ?><!--<?xml version="1.0" encoding="windows-1250" ?>   -->
> Not a bug.
>
> To quote the result screen:
>
>> + Using Direct Input mode: UTF-8 character encoding assumed
>>
>> Unlike the “by URI” and “by File Upload” modes, the “Direct Input” mode of the validator provides validated content in the form of characters pasted or typed in the validator's form field. This will automatically make the data UTF-8, and therefore the validator does not need to determine the character encoding of your document, and will ignore any charset information specified.
>>
>> If you notice a discrepancy in detected character encoding between the “Direct Input” mode and other validator modes, this is likely to be the reason. It is neither a bug in the validator, nor in your document.
> --
> Benjamin Hawkes-Lewis
Received on Thursday, 15 July 2010 09:43:17 GMT

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