firstbankak
asked on
XSL Not Applying to XML File in IE
I have an XML file with the following header:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="incidenttemplate.xsl "?>
Within my incidenttemplate.xsl file, I have the following:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DT D XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml"> etc...
When opening the XML file in Firefox/Opera, my XSL layout is applied to the file, but in IE 8 (no matter what compatibility mode it is in), it either just loads the file like a normal text document (as if the entire document is wrapped in <pre>), or shows me all the values of each of the XML tags without any line breaks.
Talk about odd? What am I missing? I need this to work in IE!
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="incidenttemplate.xsl
Within my incidenttemplate.xsl file, I have the following:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DT
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml"> etc...
When opening the XML file in Firefox/Opera, my XSL layout is applied to the file, but in IE 8 (no matter what compatibility mode it is in), it either just loads the file like a normal text document (as if the entire document is wrapped in <pre>), or shows me all the values of each of the XML tags without any line breaks.
Talk about odd? What am I missing? I need this to work in IE!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Update:
I found that for some reason IE 8 Beta 2 does not apply XSLT's the same way that IE 7 does. In fact, I couldn't get it to work at all. (No matter what mode it was in)
Opening the same XML/XSLT combo in IE7 showed my formatting correctly.
I found that for some reason IE 8 Beta 2 does not apply XSLT's the same way that IE 7 does. In fact, I couldn't get it to work at all. (No matter what mode it was in)
Opening the same XML/XSLT combo in IE7 showed my formatting correctly.
well, I only tested with IE7, maybe that is the reason
(sorry for not answering earlier to your latest question, I simply missed it)
I will have a look at what happens in IE8
(sorry for not answering earlier to your latest question, I simply missed it)
I will have a look at what happens in IE8
ASKER
What is interesting is that i've troubleshooted more and found it's most likely something on this particular computer. I uninstalled IE8 and have now tried the same xml file in IE7, which works on other computers, but on mine still just outputs the XML as if surrounded by a <pre>....
No idea what is causing it, but oh well.
No idea what is causing it, but oh well.
Did you install an XML IDE on this computer?
If you assosciate the .xml extension with an editor on windows,
you get all sorts of weird behaviour
If you assosciate the .xml extension with an editor on windows,
you get all sorts of weird behaviour
ASKER