Re: [xsl] Media types used in xml-stylesheet processing instruction

Subject: Re: [xsl] Media types used in xml-stylesheet processing instruction
From: James Fuller <jim.fuller@xxxxxxxxxxxxxx>
Date: Fri, 04 Mar 2005 11:22:47 +0100
Colin Paul Adams wrote

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?

then Jarno.Elovirta@xxxxxxxxx wrote

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

text/xsl
text/xml
application/xml


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.

gl, Jim Fuller

Current Thread