Re: Question about XHTML 2.0 and content type

Lachlan Hunt schreef:
> magick wrote:
>> Will XHTML 2.0 *have* to be sent as "application/xhtml+xml" (or one 
>> of the other XML content types) or will it be allowed to be sent as 
>> "text/html"?
>
> No, absolutely not.  Just like XHTML 1.0, it must not use text/html. 
> (note: Appendix C does provide some guidelines for use as text/html, 
> but this is widely criticised and serving XHTML as text/html under any 
> circumstances is generally considered wrong) 

Ahem, In XHTML 1.0, it nowhere says that it MUST NOT be served as 
text/html. It’s even explicitly said (in a normative section) that this 
may be done: http://www.w3.org/TR/xhtml1/#media

Also, it is not ‘generally’ considered wrong, it is considered wrong by 
some. I for one think that it has its uses, e.g. to prevent XHTML 
webpages from being inaccessible in the major internet browser out 
there. But of course if the webpage is not well-formed or valid, it is 
not XHTML, and it is a different matter.

In any case, XHTML 1.0 is a ‘compatibility specification’ for HTML 4.01 
expressed as XML. XHTML 2.0 is not, it’s a pure XML language, and thus 
it must not be served as text/html. That would be as wrong as e.g. 
labeling text/html as text/plain. There are numerous disadvantages to 
having to cope with text/html, e.g. with regard to scripting, styling 
and processing.

In the case of your Google Adsense, if the application/xhtml+xml MIME 
type is supported by all major browsers and can be used more generally 
without header sniffing, hopefully Google will add it to its list of 
recognised types, and have adsense support it. XHTML 2.0 will still be a 
working draft for a while, and I’ve read comments from some IE 
developers that application/xhtml+xml is on their radar, so maybe it’ll 
be there in IE8 or something. Who knows.


~Grauw "my XHTML 1.1 website is sometimes served as text/html"

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Thursday, 2 February 2006 04:31:05 UTC