make the browser open the XML file through the "http" rather than "file" protocol

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Wolfhart
Posts: 37
Joined: Tue Mar 27, 2007 5:46 am

make the browser open the XML file through the "http" rather than "file" protocol

Post by Wolfhart » Wed Feb 24, 2021 4:14 am

Hello,

Is there a way to specify the "Default Internet browser" in Oxygen in such a way that the browser will not open the file through the "file" protocol (i.e., "file:///path_to_file/file_name.xml"), but request it from a HTTP server running on the machine (e.g., "http://0.0.0.0:1111/file_name.xml")?

I am asking because Firefox refuses, supposedly for security reasons, to execute the XSL stylesheet associated with my XML files if they are served through the "file" (rather than the "http") protocol. Until recently, I used Chrome because it does execute the stylesheet through the "file" protocol, but now I would like to switch to Firefox because I have run into the so-called "white flash" bug in Chrome. So, in order to be able to browse my XML files with Firefox, I set up the HTTP server. But how can I call the HTTP server from Oxygen when using the "View in browser" action?

I am using Oxygen 22 on Ubuntu.

Thank you in advance for your help!
Wolfhart

Radu
Posts: 7468
Joined: Fri Jul 09, 2004 5:18 pm

Re: make the browser open the XML file through the "http" rather than "file" protocol

Post by Radu » Wed Feb 24, 2021 8:12 am

Hi Wolfhart,

The "View in browser" action is not configurable but maybe you can define an external tool:

https://www.oxygenxml.com/doc/versions/ ... tools.html

and launch it from the toolbar. External tools can run a command line and you can also use Oxygen editor variables like ${currentFileURL} which gets expanded to the current file URL.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Wolfhart
Posts: 37
Joined: Tue Mar 27, 2007 5:46 am

Re: make the browser open the XML file through the "http" rather than "file" protocol

Post by Wolfhart » Thu Feb 25, 2021 12:12 am

Dear Radu,

Thank you for the prompt reply! The idea with the external tool works beautifully. In my case, the command to use is

/usr/bin/firefox http://0.0.0.0:1111/${cfne}

Best regards,
Wolfhart

Post Reply