DITA-OT configuration.properties file and New transformation scenarios

lief.erickson
Posts: 17
Joined: Sun Mar 01, 2015 8:26 am

DITA-OT configuration.properties file and New transformation scenarios

Post by lief.erickson » Fri Jul 31, 2020 5:47 pm

oXygen 22.1.2020051804
DITA-OT 3.5.2

With DITA-OT one can use its "configuration.properties" file to add a path to where you store your plugins using pluginsdir.

Code: Select all

plugindirs = plugins;demo;../path/to/my/plugin/
This works. When I use the Run DITA-OT Integrator scenario I see that my plugin was successfully integrated. So far so good.

The problem starts when I want to create a new transformation scenario based on my plugin using New > DITA-OT transformation. My plugin transtype is not shown in the list of transtypes. Is there something else I must do? Did I miss something?

If I create a new transformation scenario and manually set the transtype parameter value to that of my plugin, I do get the correct result. The transformation completes as expected.

If I remove the plugin path from "configuration.properties" and copy my plugin to the DITA-OT plugin directory and then integrate, the transtype is available. This leads me to believe there is some interaction between oXygen and the DITA-OT "configuration.properties" file that I missed.

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

Re: DITA-OT configuration.properties file and New transformation scenarios

Post by Radu » Fri Jul 31, 2020 8:34 pm

Hi,

The good thing is that we are looking in the "lib/configuration.properties" when detecting transtypes.
That "../path/to/my/plugin/" is a relative path to a "plugins" folder which contains plugin subfolders, right? Or is it the path directly to your "plugin" folder? Because we only take the first case into account.
Is the path you set there relative to the DITA OT installation or to the "lib" subfolder from the DITA OT installation?
Out of curiosity can you try with an absolute path instead, then run again the integrator and restart Oxygen?
Our code which detects transtypes seems to interpret relative paths as paths relative to the DITA-OT folder, not to the "lib" subfolder where the "configuration.properties" exists. But I think this is right.

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

lief.erickson
Posts: 17
Joined: Sun Mar 01, 2015 8:26 am

Re: DITA-OT configuration.properties file and New transformation scenarios

Post by lief.erickson » Fri Jul 31, 2020 8:49 pm

I was already using an absolute path. I put a relative path in my example merely as that, an example. Using an absolute path and a relative path produce the same result. Restarting oXygen did not have any effect.

When I attempted to use a relative path, it was to the DITA-OT installation directory, as it says in the DITA-OT documentation "any relative paths are resolved against the DITA-OT base directory."[1]

Also, the file I changed is in the "config" folder: config/configuration.properties. It's not "lib/configuration.properties." The file doesn't exist there, since there are only jar files in the "lib" folder. I suspect that was a typo at the end of a long week.

[1] https://www.dita-ot.org/dev/parameters/ ... plugindirs

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

Re: DITA-OT configuration.properties file and New transformation scenarios

Post by Radu » Thu Aug 06, 2020 7:46 am

Hi Lief,

So it seems that Oxygen's code is looking for the "configuration.properties" inside the "DITA-OT\lib" folder instead of looking for it in the "DITA-OT\config" folder. I think this happens because originally it was placed in the "lib" folder but was moved in a certain DITA OT release to the "config" folder. So I added an internal issue to look in the "config" folder for the "configuration.properties". I suspect that if you copy the "configuration.properties" from "config" to "lib" and restart Oxygen, Oxygen should properly start detecting transtypes from your custom plugin.

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

lief.erickson
Posts: 17
Joined: Sun Mar 01, 2015 8:26 am

Re: DITA-OT configuration.properties file and New transformation scenarios

Post by lief.erickson » Thu Aug 06, 2020 9:03 am

Hi Radu--

Thanks for confirming that there's been a change in DITA-OT and that Oxygen will need to be modified too.

I removed my custom plugins. I moved "configuration.properties" to the \lib folder as you suggested. Then I restarted Oxygen. I ran the Integrator scenario. Still no luck. But that's okay. I have a workaround. I know I can create a new scenario and manually define the transtype. That's good enough until a change is made in future Oxygen release.

I suspect there are other files that would also have to be moved back to \lib before "configuration.properties" is read. I didn't go that far in my testing.

Thanks again.

Post Reply