Debugging XML/XSL for Mozilla (problem solved: 2/25/06)

An XML file is displayed correctly on IE, but Mozilla complains:

Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:

The culprit is the Apache 1.3.31 server. Alexey Smirnov proved that to me by running the files succesfully from an Apache 2.0.54 server. Also I was able to run the files correctly from my local hard drive. I looked around the web and I found the following (in biglist.com):

You may have to change the web server configuration to define the MIME type
of files with a .xsl extension. Netscape is much stricter about using the
MIME type notified by the server than IE is.
Michael Kay (of http://www.saxonica.com/). 

Furher evidence found from Anne van Kesteren's site. By changing the name of the style sheet from, say, style.xsl to style.xml and the reference in the XML file from
<?xml-stylesheet type="text/xsl" href="minimal.xsl"?>
to
<?xml-stylesheet type="text/xml" href="style.xml"?>
the files are displayed correctly on Mozilla, although no longer on IE. However this is a hack and the correct solution is to change the server configuration.

Note of 2/27/06: I logged-in in my site and added a MIME type text/xml for .xsl files and that solved the problem.

For those interested here are two files I have used.

A trivial XML file (source below)

<?xml version="1.0" encoding="iso-8859-1"?>
  <?xml-stylesheet type="text/xsl" href="minimal.xsl"?>
<message>Literal Results (Maybe)</message>

The style sheet (source below)

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
<xsl:output media-type="text/html"/>

<xsl:template match="/">
  <html>
  <head>
  <title>HTML Output</title>
  </head>
  <body>
  <p>TEST 5</p>
  <p><xsl:apply-templates/></p>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>