Apache Web Server XML XSLT

An XSLT stylesheet does not have an XML mimetype:

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"?>

xslt file

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<stylesheet version="1.0" xmlns="">
<template match="/">
<html xmlns="">
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="alert('x');">
<value-of select="f"/>

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.

4 replies on “An XSLT stylesheet does not have an XML mimetype:”

In my case, my shared hosting already have “application/xml xml xsl” but still not working. (my stylesheet file extension is xsl)

The solution is to add xsl to the text/xsl mime type.

Please read the article because it explains how to fix this error.

However, I’m 90% sure that the bots will not see the error and they will get the file without any problems.

I am having the same problem with and xml sitemap on my wordpress website…

this error I am only getting in firefox,

in opera , ie , and flock , and safari, and I am only gettign the error in firefox

Comments are closed.