Re: CSS validator stricter than XML validator

* Philippe Le Hegaret wrote:
>Bjoern Hoehrmann wrote:
>> The HTML Validator treats the document as compatible HTML document, the
>> CSS Validator as XML document. You define
>> 
>>   <meta http-equiv="Content-Type" content="text/html;
>>                                             charset=iso-8859-1" />
>> 
>> in the document, the literal [éä...] are recognized as ISO-8859-1
>> characters.
>
>> In XML document, the encoding must be declared in the XML
>> declaration, your document doesn't have an (or 'a'?) XML declaration, so
>> the document is treated as UTF-8-encoded and the octets for the
>> mentioned 8-Bit-characters in ISO-8859-1 aren't valid UTF-8 sequences.
>
>Not only in the XML declaration but also in the protocol. See
>ftp://ftp.isi.edu/in-notes/rfc3023.txt.

Yes, but the octet sequences the XML parser receives must match the
(implicit or explicit) declared encoding.

>> I'd say it's a bug in the CSS Validator anyway, if it's text/html, treat
>> it as text/html.
>
>I disagree on this point:

You surely don't, as you point out

>In order to be consistent with the XML 1.0 Recommendation [XML], the user
>agent must parse and evaluate an XHTML document for well-formedness.

... and even if you label a document as text/html it can be still XHTML
and XHTML parsing rules still apply ;-)

Anyway, I shouldn't mail around the world on 5am ;-)
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Saturday, 12 May 2001 12:33:57 UTC