[thelist] Yet(!) another XHTML 1.1 question..

Rick den Haan rick at countryexpress.nl
Wed Nov 3 04:18:24 CST 2004

You can force it to be served as application/xhtml+xml using a server-side
scripting language. I use the following PHP at the top of most of my XHTML

  if (strpos($_SERVER['HTTP_ACCEPT'], "application/xhtml+xml")!==FALSE) {
    header("Content-Type: application/xhtml+xml");
  else {
    header("Content-type: text/html");

By the way, I just discovered IE6/winXP-SP2 parses XML documents through an XSL
parser (if I use the above technique to force a text/xml content-type). Has
anybody else noticed this, or was this already the case in pre-SP2 IE6??


> Yes it is me again......:-)
> Right:
> My page validates as XHTML 1.1 but it is being served as text/html to all 
> browsers (not just IE6 which doesnt support application/xhtml+xml, and 
> therefore needs to be served text/html, fo the page to work).
> According to what I have read so far, my understanding is that my page 
> should be being served as xml to Mozilla and other supported browsers, and 
> be parsed by the XMl parser. This is not happening however, and when I go 
> to the validator, it tells me that my content is text/html.
> Am I missing something here to allow this to be served as XML?
> you can see the actual document here:
> http://www.jewelswebgraphics.com/
> (I am beginning to think I might be better off going back to XHTML 1.0 
> strict and be done with all this! It is apparently ok to serve this doctype 
> as text/html, but not XHTML1.1 which must be served as xml according to the 
> W3C)

More information about the thelist mailing list