An XSLT stylesheet does not have an XML mimetype:

June 8, 2007 · Posted in Apache Web Server, XML, XSLT · 4 Comments 

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

Error occured on Firefox 2.0 when working with XML, XSLT.

xml file:

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="product-list.xslt"?>
<f>PRODUCT DETAILS</f>

xslt file

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>aaa</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="alert('x');">
<value-of select="f"/>
</body>
</html>
</template>
</stylesheet>

The error occurs because the web server (in my case Apache) had this entry in the mime.types file:

text/xml            xml xsl

The fix in my case is:
Change extenstion from xslt to xls on the stylesheet file or add xslt to the text/xml entry in mime.types file in Apache.

Hello world!

June 7, 2007 · Posted in Uncategorized · Comment 

Hi, welcome!

We here at TheErrorMessage.com are planning to build a website with many error messages and their fixes and solutions. This will be a lengthly process so we are on our way.

If you can’t find your error and the fix here but you found it elsewhere and you want to help us please contact us and we will create an account for you so you can publish articles here or we will publish the fix on your behalf whichever you prefer.

Thank you.