468,771 Members | 1,679 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

An XSLT stylesheet does not have an XML mimetype

3
Hi,

I'm new to FireFox. I am currently trying to convert my website to be compatible with it. Doing so I’m trying to process some XML/XSLT pages (preferably without using JavaScript).

When I view my XML pages using IE 6 or 7 it displays beautifully both accessed locally as through HTTP on my ISP’s server where I put them using FTP.

When I view them in Mozilla FireFox 2.0, it displays ok when accessed locally. The CSS presentation – however – is lost in the process, which will need some attention later.

When I try to view it via HTTP from the web server I get the following error:
Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:

As I understand from other posts I should use “text/xml” or “application/xml” instead of “text/xsl”, but that doesn’t make any difference in FireFox. In IE 6/7 pages then will not transform anymore.

The Mozilla XSLT FAQ is too abstract for me to get a working result.

What does “Make sure the server serves style.xsl as text/xml or application/xml.” mean? Apart from putting files on the server using FTP I do not have access to it.

How can I get this to work in FireFox (, IE and others as well)?
How can I get firefox to also process style.css?

Please help.
Thanks in anticipation,


My XML page starts with the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Tall Ships list.xslt"?>

I also tried, but with no success::
<?xml-stylesheet type="text/xml" href="Tall Ships list.xslt"?>
<?xml-stylesheet type="application/xml" href="Tall Ships list.xslt"?>

My XSLT page starts with the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Omit the XML declaration-->
<xsl:output omit-xml-declaration="yes"/>
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="no"/>
<xsl:template match="/*">
<html xmlns="http://www.w3.org/TR/REC-html40">
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
Jul 20 '07 #1
4 7491
jkmyoung
2,057 Expert 2GB
Try changing the file extension from xslt to xls.
Jul 21 '07 #2
th1421
3
Try changing the file extension from xslt to xls.
I changed the file extension to .xsl. This solves the error.
Now both the local and the http presentation in Mozilla is the same.

This is a huge step forward for me. Thanks a lot!

I also replaced the following line with the next one:
Expand|Select|Wrap|Line Numbers
  1. <html xmlns="http://www.w3.org/TR/REC-html40">
Expand|Select|Wrap|Line Numbers
  1. <html xmlns="http://www.w3.org/1999/xhtml">
When accessing the page directly it's nearly perfect now.

However when accessing the xml inside an iframe the following css file's styles are not applied:
Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css" href="style.css"/>
I do not know if it's XML related.
Maybe I should create another post for this one... in the HTML/CSS forum.

Again, thanks a lot!
Jul 21 '07 #3
th1421
3
I changed the file extension to .xsl. This solves the error.
Now both the local and the http presentation in Mozilla is the same.

This is a huge step forward for me. Thanks a lot!

I also replaced the following line with the next one:
Expand|Select|Wrap|Line Numbers
  1. <html xmlns="http://www.w3.org/TR/REC-html40">
Expand|Select|Wrap|Line Numbers
  1. <html xmlns="http://www.w3.org/1999/xhtml">
When accessing the page directly it's nearly perfect now.

However when accessing the xml inside an iframe the following css file's styles are not applied:
Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css" href="style.css"/>
I do not know if it's XML related.
Maybe I should create another post for this one... in the HTML/CSS forum.

Again, thanks a lot!
After restarting from the home page everything works fine now!
Jul 21 '07 #4
jkmyoung
2,057 Expert 2GB
Glad to hear it worked.
Sorry for the typo, must have had Excel on the mind.
Jul 23 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Sarah Haff | last post: by
7 posts views Thread by pintihar | last post: by
2 posts views Thread by Paolo Pignatelli | last post: by
2 posts views Thread by Richard L Rosenheim | last post: by
7 posts views Thread by Matt Silberstein | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.