Using the same quote in https://stackoverflow.com/a/5225321/271577 , it is dependent on the root element. Although an exception may be made for XHTML, if the content-type is not recognized through detection (whether DOCTYPE sniffing, namespace checking, etc.), then it is likely that the XML is not likely to be rendered as XTHML, but rather as XML.
XML can be rendered with CSS, even though it does not have default styling assigned to any elements as in XHTML (since it is meant to be a language to define one's own language). To assign styling, as in XHTML, one must in particular choose whether the element is to use display: block;
or display:inline
.
The XML specification does not make mention of DOCTYPE sniffing, and this practice has been discouraged by some for XML: http://hsivonen.iki.fi/doctype/#xml in favor of namespaces and processing instructions.
But per https://developer.mozilla.org/en/Mozilla%27s_DOCTYPE_sniffing , Firefox before 4.0 "sniffing only occurs for documents sent as text/html" and application/xml should "trigger full standards mode". However, this is in reference to distinguishing different HTML modes; to identify XHTML out of XML, at https://developer.mozilla.org/en/XML_in_Mozilla , I believe the following may be suggesting that a recognized PUBLIC DOCTYPE was supposedly used to distinguish XHTML from "pure" XML:
Please note that the XHTML entities, like รค, work only in
conforming XHTML documents that have a valid XHTML Formal Public
Identifier (or in other words, a DOCTYPE section with a PUBLIC
identifier). XHTML entities will not work in arbitrary XML documents,
not even if the XHTML namespace is used." which is then followed by a
list of valid identifiers.
But if you were using a recognized PUBLIC DOCTYPE and it was still not treated as true XHTML (e.g., with ability to style the body tag alone, without needing to style the html root as well--a practice I seem to recall may have been necessary, at least earlier, for XHTML/HTML polyglot documents), then my guess would also be that it was a bug. I would also think that a namespace should have been sufficient (and without a namespace, it shouldn't work since XML+Namespaces requires one for application-specific behavior).