[whatwg] Configure Apache to send the right MIME type for XHTML

Anne van Kesteren wrote:

>> How so?
> 
> Well, your article advocates sniffing specific user agents where the one 
> written by Mark Pilgrim uses the Accept: header which was actually 
> designed for this... Google, for one, is known for not supporting XHTML 
> really well.

I'm not doing content negotiation here. There's one representation 
available. It is XHTML. We can send that to most browsers and they'll 
deal reasonably. Two I know of have problems (IE and Lynx) so we lie to 
them and tell them it's text/html.

I am curious what problems Google has with XHTML. Then they deal.

>>> Then of course there are some interoperability issues with XHTML and 
>>> entities that haven't really been sorted out yet...
>>
>> Such as?
> 
> Well, since browsers have non-validating XML parsers you actually can't 
> use entities, but then you can because they have some build in knowledge 
> for certain DOCTYPEs... However, this is not guaranteed to be cross 
> browser.

What browsers can't handle this?

Theoretically, it is completely spec compliant for a browser to notice 
PUBLIC identifier in the DOCTYPE, use that to resolve entities or do 
whatever else it needs to do with that DTD, and never actually load the 
file at the SYSTEM ID. You absolutely can use all defined entities that 
are available in XHTML 1/HTML 4. Practically, that's exactly what 
happens in every browser I've tested, but there might be one I've missed 
somewhere.

If you meant that you can't define new entities, then that's essentially 
correct. That's also true of HTML of course.

-- 
?Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/

Received on Wednesday, 7 March 2007 09:46:43 UTC