Mime types

1. XSLT mime type


XSLT mime type

Jarno Elovirta and Jim Fuller

> Which media types are currently used in xml-stylesheet processing 
> instructions for XSLT? I know about application/xslt+xml, and the 
> unregistered text/xsl. Are there any others in use?

Browsing the Mozilla CVS, nsXMLContentSink.cpp <http://lxr.mozilla.org/mozilla/source/content/xml/document/src/nsXMLContentSink.cpp> seems to check for


The Mozilla CVS search didn't find occurences of "application/xslt+xml" in the source code.

Jim Fuller adds,

to be clear;

XSLT 1.0 spec states that MIME types text/xml and application/xml 'should' be used, though there are a few caveats;

- The spec goes on to say that new media types can 'also' be used, so things like text/xsl is fine.

- I tend to avoid the mime-type text/xml....as this conflicts with what various specs say on how to determine charset (XML and RFC3023)....

- IE (last time I checked) uses text/xsl

- Mozilla is fine with text/xml and application/xml...and something I didnt know (from Jarno's post) apparantly uses text/xsl as well

- and |application/xslt+xml is the mime-type as specified in the XSLT 2.0 draft spec

clear as mud....from a server perspective I still tend to first check device, then browser, browser type, version....then send the correct mime-type (with lang/charset being checked somewhere along that sequence) based on the exact browser type/version and XSLT processor version.