469,356 Members | 1,965 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Problem with mimetype?

Hello again, I can see myself becoming a regular feature at the top here ;)

When I view my XML page using I.E.6 it displays fine from both my web
server and when opened from windows explorer.
But when I view it in mozilla 1.7, it displays fine from windows
explorer, but when viewed via HTTP from the web server I get the
following error;

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

My server has the XML mimetype text/xml and I have tried configuring it
with text/xsl as well to no avail.

My XML page starts thus;

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>

And my XSLT page starts thus;

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" doctype-system="./board.dtd"/>

Is this a problem with my server (I have tried it on another) or with
the declarations?

Thanks in anticipation,

Tom.
Jul 20 '05 #1
3 10867


GR33DY wrote:

When I view my XML page using I.E.6 it displays fine from both my web
server and when opened from windows explorer.
But when I view it in mozilla 1.7, it displays fine from windows
explorer, but when viewed via HTTP from the web server I get the
following error;

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

My server has the XML mimetype text/xml and I have tried configuring it
with text/xsl as well to no avail.

My XML page starts thus;

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>


Make sure the server serves style.xsl as text/xml or application/xml.
See the Mozilla XSLT FAQ at
http://www.mozilla.org/projects/xslt/faq.html
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Martin Honnen wrote:


GR33DY wrote:

When I view my XML page using I.E.6 it displays fine from both my web
server and when opened from windows explorer.
But when I view it in mozilla 1.7, it displays fine from windows
explorer, but when viewed via HTTP from the web server I get the
following error;

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

My server has the XML mimetype text/xml and I have tried configuring
it with text/xsl as well to no avail.

My XML page starts thus;

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>

Make sure the server serves style.xsl as text/xml or application/xml.
See the Mozilla XSLT FAQ at
http://www.mozilla.org/projects/xslt/faq.html


D'oh!

I'd forgotten to add the xls extension to text/xlm.

Cheers :)

Tom
Jul 20 '05 #3
GR33DY wrote:
My server has the XML mimetype text/xml and I have tried configuring
it with text/xsl as well to no avail.

My XML page starts thus;

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>


text/xsl is not an official mimetype for xsl stylesheets. It's Microsoft
specific. Use text/xml or application/xml instead.

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by S_p_ike | last post: by
5 posts views Thread by Juho Saarikko | last post: by
reply views Thread by Scott McFadden | last post: by
1 post views Thread by Patrick F | last post: by
1 post views Thread by byrapaneni | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.