[xsl] text/xsl (was Re: Hello World)

Subject: [xsl] text/xsl (was Re: Hello World)
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 19 Jun 2002 17:33:36 -0600 (MDT)
J.Pietschmann wrote:
> Joerg Heinicke wrote:
> > <?xml-stylesheet type="text/xsl" href="test.xsl"?>
> Technically, this is illegal, as there is no MIME type
> text/xsl.


> Well, last time I looked there was none.
> Should be text/xml.

No it shouldn't.

> application/xml might work too (untested).


The correct type is application/xslt+xml, per RFC 3023. It should be used

The only type you can effectively use in an xml-stylesheet processing 
instruction at this time, however, is text/xsl, because that's all that
the browsers will recognize, AFAIK.

We will never be rid of text/xsl, unfortunately. If IE started supporting the
correct type in their next release, we might finally start to see text/xsl
fade in about 3 years, when people stop worrying about keeping their stuff
working in the older browsers.

Of course, the whole notion of hard-coding a stylesheet reference in an XML
document is a source of controversy. It is almost exclusively used to let a
browser load a data source directly through a standard HTTP GET and to force a
particular rendering of that data. This is a problem that could have been, and 
has been, solved in other, arguably more intelligent ways.

   - Mike
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread