Re: Bugs in XHTML validator

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 UTC