Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Safari be made to perform an XSL transform on a local file?

Tags:

xml

safari

xslt

Basically the same as this question, but for Safari.

When I try to open an XML file (test.xml) on my local filesystem that references an XSL file (test.xsl) in the same directory, Safari doesn't render anything and instead only gives this error in the web dev console:

Unsafe attempt to load URL file:///Users/john/test.xsl from frame
with URL file:///Users/john/test.xml. Domains, protocols and ports must match.

Is there a way to tell Safari to treat local files from the same directory as same-origin?

Edit: I just didn't look hard enough. "Developer->Disable Local File Restrictions" does what I need, even though that seems to disable all local file restrictions, whereas I only want to be able to include files from subdirectories.

like image 319
BlenderBender Avatar asked Dec 21 '25 03:12

BlenderBender


1 Answers

You can disable all local file restrictions in Safari by checking Developer->Disable Local File Restrictions.

like image 168
BlenderBender Avatar answered Dec 23 '25 13:12

BlenderBender



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!