Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox and remote XSL stylesheets

Tags:

xml

firefox

xslt

I’m trying to load local XML files with a remote XSL stylesheet. IE seems to handle this just fine but not firefox. Is there a fix for this?

like image 819
Matt Avatar asked Aug 06 '10 02:08

Matt


1 Answers

If it's not a syntax problem, I think it's a same origin policy issue. Firefox (and also Chrome and IE9) doesn't transform a local XML with a remote XSLT for security reasons. It gives an unknown error 805303f4. Imagine that the XSLT could produce malicious JavaScript, embedded in the HTML output code.

Solutions, if you are the developer:

  • make the transformation on the server side and give the user the link to the output HTML
  • download locally (on the background) both the XML and the XSLT and then open the XML for the user

I noticed that CSS and image files can remain on the server without restrictions.

like image 117
bluish Avatar answered Sep 20 '22 12:09

bluish