get url list from project pane

Are you missing a feature? Request its implementation here.
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

get url list from project pane

Post by bwbohl »

Hi all,

I would like to apply a transformation scenario on all files selected in a project folder. I know that in principle this works already, but the scenario is being applied to each file individually. Is there a way to just get the URLs and pass them to a single transformation?

In the end I want to evaluate the selected files and write the result (with values from each file) to a single file.

I'm still using oXygen 18.1 so maybe it is already possible in the current release? Would be a persuasive argument to make my organisation upgrade ;-)

May thanks in advance,
Benjamin
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: get url list from project pane

Post by Radu »

Hi Benjamin,

At some point we wanted to create an Oxygen editor variable named something like ${projectSelectedResources} which would resolve to something like a ";" separated list of URLs identifying the project selected resources.
Once this editor variable would have been in place, in an Oxygen XSLT transformation scenario you could have defined an XSLT parameter and set its value to ${projectSelectedResources}. When the transformation scenario would have been applied, your XSLT stylesheet would have received a parameter containing a ";" separate list of URLs representing your project selected resources. After this your XSLT could have used "xsl:analyse-string" to split the list of URLs and for each URL load it using the "document()" function and process it.
We have not yet added this editor variable to Oxygen but if you are interested in this approach maybe I can create an Oxygen plugin which adds support for this editor variable as we do have the APIs for a plugin to access selected resources from the Oxygen Project view.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

Re: get url list from project pane

Post by bwbohl »

Hi Radu,

yes that would be exactly what I need ;-)
If you could supply me with a corresponding addon, that would be fantastic!

Cheers,
Benjamin
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: get url list from project pane

Post by Radu »

Hi Benjamin,

I created a sample plugin here:
https://github.com/oxygenxml/wsaccess-j ... orVariable

I also added a readme file there.
To make this work you can copy the "customProjectSelectionEditorVariable" folder to the Oxygen installation folder "plugins" folder and restart Oxygen.
Or you can pack the plugin as an add-on:

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

The plugin should work also in Oxygen 18.1.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

Re: get url list from project pane

Post by bwbohl »

Dear Radu,

many thanks for your efforts! Unfortunately it doesn't seem to work here… maybe I got something wrong?
My output is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><root/>
which seems fine as in the sample stylesheet but the messages are empty, beides:

Code: Select all

 URL ${projectSelectedResources}
Thanks,
Benjamin
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: get url list from project pane

Post by Radu »

Hi Benjamin,

It seems the API I used to get the project selection was added in Oxygen 19.1. Sorry that I did not initially realize this. Maybe you can try to get a trial license key of Oxygen and try with our latest Oxygen 22.0.
Also after starting Oxygen you should check in the Oxygen Preferences->"Plugins" page to see if the plugin is listed there as installed.
If not

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

Re: get url list from project pane

Post by bwbohl »

Radu wrote: Mon Apr 06, 2020 1:07 pm It seems the API I used to get the project selection was added in Oxygen 19.1. Sorry that I did not initially realize this. Maybe you can try to get a trial license key of Oxygen and try with our latest Oxygen 22.0.
Ok, I'll see to getting a trial license or a proper update for our project ;-)
Radu wrote: Mon Apr 06, 2020 1:07 pm Also after starting Oxygen you should check in the Oxygen Preferences->"Plugins" page to see if the plugin is listed there as installed.
It definitely is, I also tried both ways, copying to ${oxygenDir}/plugins and packaging.

Many thanks, nevertheless!
Benjamin
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Post Reply