I’m trying to render XML+XSL 2.0 in browser, returning .xml pages with application/xml content type and .xsl pages with text/xml. Safari is complaining for the main document: “Resource interpreted as document but transferred with MIME type application/xml.” (but keeps rendering everything just fine).
I want to get rid of this warning message. What content-types should be used for the XML document?
I’ve had success using
text/xmlwith the stylesheet astext/xsl(or perhaps this is OK astext/xmlas you have it working).text/xslis widely recognized, but not "official" (as far as I understand it).According to RFC 3023: "If an XML document that is, the unprocessed, source XML document is readable by casual users,
text/xmlis preferable toapplication/xml. MIME user agents (and web user agents) that do not have explicit support fortext/xmlwill treat it as text/plain, for example, by displaying the XML MIME entity as plain text.application/xmlis preferable when the XML MIME entity is unreadable by casual users."See https://www.rfc-editor.org/rfc/rfc3023#page-16