|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello!
I have a problem, I've simplified the code as much as I could: file: test.xml Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <TITLE> Hello World </TITLE> file: test.xsl Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <xsl:value-of select="TITLE"/> </xsl:template> </xsl:stylesheet> This works fine in IE6 but fails in Mozilla firefox 0.8 with the error: "Error loading stylesheet: Parsing an XSLT stylesheet failed." I've narrowed it down to the href="test.xsl" in the text.xml file. Strange this is that if I write href="a.xsl" I get a file not found error. So the file in the example above IS found but can't be loaded!!! Even stranger is that if I write a complete adress to the file like this: href="c:\temp\xmltest\test.xsl" it works as it should without problems. If the path is href="http://localhost/xmltest/test.xsl" it does not work. I need to be able to write relative paths, and webpaths. Could someone please help me, I am out of ideas, and I am not good at this! P.S. I use XSL 1.0 D.S. Thanks in advance /Rickard Haake Last edited by Xaake : February 17th, 2004 at 10:37 AM. Reason: Adding info |
|
#2
|
||||
|
||||
|
I was able to repeat the error.
In the XML file, I got rid of the type="text/xsl" and now it works. I am using Firefox 0.8.2004020. |
|
#3
|
||||
|
||||
|
It doesn't work in IE though, bummer.
I will keep trying. |
|
#4
|
|||
|
|||
|
Found a solution
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> Works, I tried that namespace before, but not with the version="1.0" then it did not work, so I overlooked it. /Rickard Haake |
|
#5
|
|||
|
|||
|
Still not working
Hey guys,
just a little thing - just in case anybody ever comes back to the thread - I'm having the same problem as described above but with trying the here found solution I only get my browser to ignore the XML and XSL (trying Mozilla, Safari, IE)!!!! I'm pretty sure that's not what we want, coz then I wouldn't need to do it in XML, would I? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Error loading stylesheet in Mozilla |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|