On 3/5/07, hadley wickham h.wickham@gmail.com wrote:
On 3/4/07, Allan Odgaard throw-away-1@macromates.com wrote:
On 5. Mar 2007, at 01:00, porneL wrote:
I've just noticed that template for XHTML/1.1 has been changed to include application/xhtml+xml content type in <meta> element.
This is completly misguided as <meta> is there only for backwards- compatibility non-XHTML user-agents -- that is only those which *do not* support application/xhtml+xml.
From W3C XHTML FAQ: "Note that a meta http-equiv statement will not be recognized by XML processors, and authors SHOULD NOT include such a statement in an XHTML document served as 'application/xml' (and 'application/ xhtml+xml' as well for that matter)."
The reason it says SHOULD NOT (which means "not recommended", see RFC 2119) is that for an XML document, you declare the content type using processing instructions. Though I have no idea how the "content type" processing instruction looks, anyone?
If it's an xml file, doesn't that already imply the the content-type is xml? Isn't the content only important when you're sending things "over the wire" so the program at the other end can recognise what to do? The meta tag is just a hack for html to give the page author some way of overriding the content-type that the server is sending.
See also:
http://ln.hixie.ch/?start=1144794177&count=1 http://ln.hixie.ch/?start=1154950069&count=1
which support what I meant to say: browsers use complicated heuristics to determine the actual content-type of a page - and the http content-type and html meta tag are often ignored.
Hadley