Click to See Complete Forum and Search --> : XML MIME Types and Mozilla/Firefox


Dark Ninja
09-17-2004, 04:37 AM
Hello --

I am creating various XML documents for my website (with XSL stylesheets). I can view the document okay if I just open it off my computer's hard drive in Firefox. However, after I upload it to my server space, and then try to open it, I receive this message:

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

I think this has something to do with the MIME type not matching up with what the server is saying it is, but I'm not positive. And, to top it off, if that was the problem, I wouldn't know how to fix it anyway.

Does anybody have any suggestions?

Thanks

bwkaz
09-17-2004, 06:28 PM
Does your version of Firefox have a "Page Info" option under the View or Tools menus? I think I got mine from an extension, but maybe not.

Anyway, if you have that, one of the tabs on the dialog that that brings up is the Headers tab. On that tab, the request and response headers are shown. Check through the response headers for a Content-Type header on the XSLT file (you'll have to load it into the browser window to do this, not the XML file).

XSLT stylesheets MUST be served with an application/xml or text/xml mime-type. This is controlled by the server that you're using -- if it's a server you have control over, then edit its configuration to serve up .xslt files with an application/xml or text/xml mime-type. If not, complain to your hosting provider, because they've configured it wrong.

Also see http://www.mozilla.org/projects/xslt/faq.html for other possible problems.