Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE 9 under seven doesn't transform an XML using it's referenced XSL file anymore

Prior to IE9 I could open a local XML file using a XSL file. The browser would correctly locate the XSL file referenced in the XML and use it to transform the XML to an HTML page. That doesn't seem to be the case anymore, I just get a blank page.

When I hit F12 to get developer tools and enable IE7 or IE8, the XML file is loaded well. But I want to open it with IE9. Nevertheless the use of IE9 shows the error message

 XML5658: Un signe « : » ne doit pas se trouver dans un nom.

And this one matches the line:

<?xml:stylesheet type="text/xsl" href="file.xsl"?>

I have read Style sheet for XML not rendering in IE9

My XSL is in compliance with this post.

Is there a workaround?

like image 448
new Avatar asked Apr 27 '13 19:04

new


1 Answers

Instead of writing

<?xml:stylesheet type="text/xsl" href="file.xsl"?>

which happens to work fine in the IE browsers whose versions are less than IE9, we should write it in the standard format for associating stylesheets with XML documents:

<?xml-stylesheet type="text/xsl" href="file.xsl"?> 

I also recommend that those having XSL processing problems with IE 9 go to:

http://msdn.microsoft.com/en-us/library/ie/hh180178%28v=vs.85%29.aspx

That helped me solve my issue.

like image 125
new Avatar answered Sep 30 '22 12:09

new