Forum Moderators: coopster & phranque

Message Too Old, No Replies

XSLT in Mozilla Firefox error

Works fine in IE

         

lindamarcella

7:09 pm on Sep 12, 2004 (gmt 0)

10+ Year Member



Someone else posted this in June but the thread closed with no responses. I'm having the same problem, so am resurrecting the thread. My version of Mozilla is 0.9.2. Could the cryptic message mean that some Microsoft-specific (only recognizable to Microsoft) thing is in the .xsl file?

I notice similar errors in lots of Google entries from non-English speaking pages, and am wondering if the errors are because of Mozilla bugs in handling different encodings. I tried saving my files with Word in UTF-8, because I usually use the Textpad editor that only saves in Windows-1252 format, but that still didn't fix it. Is UTF-8 the normal encoding?

Does anyone have an XML/XSLT example on the web that works in Mozilla with "xsl:for-each"? Another weird thing about this bug is it works in Mozilla on my local computer, but doesn't work when the page is on a remote server. I also noticed that IE works with "xsl:stylesheet" (a colon) but Mozilla needs "xsl-stylesheet" with a hyphen. Maybe it has to do with colons or hyphens?

Does anyone know how to fix this?

--------------------------------------

I'm having troubles getting to grips with XSLT parsing in firefox. Code works fine in IE. I have been using the standard :

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="name.xsl"?>

But I just get the error: Error loading stylesheet: Parsing an XSLT stylesheet failed.

Can anyone help?

Thanks

py9jmas

7:37 pm on Sep 12, 2004 (gmt 0)

10+ Year Member



it works in Mozilla on my local computer, but doesn't work when the page is on a remote server.

What mime-type/character encoding is the server using for the XSL and XML file? When Mozilla loads the file from a local disk it'll use heuristics to decide on the character encoding. When requesting the XSL from a web server it must honour the server's mime-type/character encoding declaration.

The examples at
[w3.org...]
start with xsl:stylesheet or xsl:transform. The XML prolog (<?xml version="1.0"?> ) is optional.

lindamarcella

7:53 pm on Sep 12, 2004 (gmt 0)

10+ Year Member



Py9jmas, thanks for your reply. I just uploaded it to a different server and it worked. Maybe it's the server configuration. Is there a way to set the MIME type from the page, like with a meta-tag or something?

In Mozilla locally, and on the server that works, the Tools -> Page Info says text/html. On the server that doesn't work it says Unknown.