473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 7705
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

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

Similar topics

4
by: Sarah Haff | last post by:
Hi, What would be minimilistic XSLT that does "nothing" (no transformation) to the given XML content. Thank you. Sarah Haff
0
by: Andy Dingley | last post by:
I'm writing XSLT to transform fntg-schema (our own project's document schema) into PartnerML, a HTML-like XML dialect used for mobile phones. I'm using XMLSPy 4.4 to do this. The schema for...
3
by: Michael Hertz | last post by:
I am performing a XSLT stylesheet on a XML document and produce a new XML document. How can I insert in this new XML stylesheet a tag <currtime>..."the current date/time"....</currtime> where...
7
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element...
2
by: Paolo Pignatelli | last post by:
I am trying to work the example on http://support.microsoft.com/default.aspx?scid=kb;EN-US;q315888 . I follow esxactly the advice (I beleive): Here are the files: WebForm1.aspx: -- .......
2
by: Richard L Rosenheim | last post by:
I loaded a XSLT stylesheet into a XMLDocument to retrieve some of the data. I received an exception when the SelectNodes method was invoked. The message was "System.Xml.XPath.XPathException -...
7
by: Matt Silberstein | last post by:
I have a data intensive web app I am developing. The core of the app will do a db query and build a page. I plan on getting the data as xml and feeding that and a xslt stylesheet to the browser....
1
by: aplonis | last post by:
I have an XML (Atom) doc at this URL... Atom ...which displays as HTML using any one of three XSLT stylesheets, the principal one being at this URL... XSLT ...with two...
2
by: milecimm | last post by:
Hello, I need some help to solve the following problem (if it is possible, that's it): I'm using a xpath expression to programatically get data from my xml file. I want to transform ONLY the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.