Using fix.external.refs.com.oxygenxml from command line

Post here questions and problems related to editing and publishing DITA content.
MMS
Posts: 2
Joined: Thu Sep 18, 2014 11:47 am

Using fix.external.refs.com.oxygenxml from command line

Post by MMS »

Hi,

For a project I am trying to use the same transformations that the authors are using within oXygen from the command line. The parameter fix.external.refs.com.oxygenxml is set to true but seems to be ignored in the command line build. Apart from that, the build is completed successful.

Transtypes are XHTML and PDF2. Am I missing something? Any help is appreciated!

Thanks in advance,
Mark
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by Radu »

Hi Mark,

This parameter is not part of the DITA Open Toolkit, it is something we added externally to it.
Unfortunately we did not add this support for external references fixup with the initial intention of it being used from a command line.
If you look in the command line which is run by Oxygen when this parameter is set, the command line used to start the ANT build file also has this system property set to it -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration

That specific XML parser configuration is inside the main Oxygen JAR library which is set as the first library in the list of libraries which are passed to the ANT process when it starts. Unfortunately the main Oxygen library also contains patches for certain libraries like the Saxon EE commercial processor which you cannot use from the command line because it is a commercial library.

So I'm not sure you could get it to work from the command line.
Probably that parameter was added as a way to bypass such problems:

http://www.oxygenxml.com/doc/ug-oxygen/ ... -refs.html

Maybe instead of using the parameter you could automatically create from a custom ANT build file a DITA Map which is on an upper level in the hierarchy and refers to the current main DITA Map, then delegate to the DITA OT to publish this upper-level DITA Map instead.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
MMS
Posts: 2
Joined: Thu Sep 18, 2014 11:47 am

Re: Using fix.external.refs.com.oxygenxml from command line

Post by MMS »

Hi Radu,

Thanks for replying so fast. I'll try generating a map on a higher folder level, as you suggested. That's probably going to save me some time.

Best regards,
Mark
kirkilj
Posts: 110
Joined: Fri May 14, 2010 12:14 am

Re: Using fix.external.refs.com.oxygenxml from command line

Post by kirkilj »

I obviously didn't search carefully enough looking for an answer to this same question, which I sent a few minutes ago via the support email method.

It sounds like it's not an easy feature to repurpose for command line usage. We need our users who write scripts to implement publishing workflows as well as some automated job queues to produce the same PDF output that they could initiate via the GUI.

This parameter fixed an issue we had with symbolic links to maps, topics, and images that all pointed to a flat file system space that is out of our control to change.
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by Radu »

Hi John,

What I could try to do would be to take the fixup code we have (which is Java) and try to obtain an independent project containing it without any dependencies to our main Oxygen library and see if I can get it to work from a command line.
If you or Mark (who started this thread) are interested in this approach, we can exchange some offline emails (support@oxygenxml.com).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbmoore
Posts: 6
Joined: Tue Jan 17, 2017 10:29 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by gbmoore »

Has this issue been enabled for command line use yet? I am still unable to use it with Webhelp Classic. If so, any advice for using it?
gbmoore
Posts: 6
Joined: Tue Jan 17, 2017 10:29 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by gbmoore »

Has this issue been resolved in the lastest code? I am trying to use from a command line and facing the same problem. I also have tried using the DITA-OT standard generate.copy.outer=3, but the oxygen plugin does not recognize/use it. This is a regression, as the vanilla toolkit allows use of this parameter in all build types.
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by Radu »

Hi,

The Oxygen specific parameter fix.external.refs.com.oxygenxml is not supported when building output using DITA OT from a command line.
We already have an issue registered for this, I will add your vote for it and if we find a technical solution for this in a future version we will update this forum thread.

About this remark:
I also have tried using the DITA-OT standard generate.copy.outer=3, but the oxygen plugin does not recognize/use it.
This is a parameter used in the DITA OT pre-processing part. And the Oxygen WebHelp plugin (just like any other plugin) uses this pre-processing part.
So plugins do not explicitly set of use this parameter in their build files.
If you publish to plain XHTML using this parameter, does it do anything different then when publishing to WebHelp?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbmoore
Posts: 6
Joined: Tue Jan 17, 2017 10:29 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by gbmoore »

Hi Radu,

Thank you for a swift response. Regarding your question:
If you publish to plain XHTML using this parameter, does it do anything different then when publishing to WebHelp?
We publish with html, both the vanilla DITA-OT html plugin and a customized D4P HTML5 plugin, and both properly copy all the image files. With oXygen webhelp, the images are all lost. We consider this a regression, as the parameter works properly with our other plugins.

Thank you.
Gina Baronian-Moore
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by Radu »

Hi Gina,

Are you publishing using WebHelp Classic or WebHelp Responsive?
I started creating and publishing to WebHelp Responsive various small DITA projects with references to an image outside of the main DITA Map folder, having the "generate.copy.outer=3" set.
In my tests the images are properly copied to the output folder but the links from the table of contents to the topics are broken. So I added on issue on our side for this.
If you encounter different problems with your project it would be great if you would share with us via email (support@oxygenxml.com) a small DITA project exhibiting the structure that you have on your side.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbmoore
Posts: 6
Joined: Tue Jan 17, 2017 10:29 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by gbmoore »

Hi Radu,

We have seen the same behavior with Webhelp Classic where the links from the table of contents to the topics are broken. We have that problem in some cases, and I will send you a sample set demonstrating where the topics appear in the output, but the images do not. Thank you. -Gina
syed
Posts: 76
Joined: Tue Nov 14, 2017 8:34 pm

Re: Using fix.external.refs.com.oxygenxml from command line

Post by syed »

Hi,
Is fix.external.refs.com.oxygenxml now part of the command line run?

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

Re: Using fix.external.refs.com.oxygenxml from command line

Post by Radu »

Hi,
We do not support the "fix.external.refs" parameter when running DITA OT transformations from the command line using the "dita.bat", this is also written in our docs:
https://www.oxygenxml.com/doc/versions/ ... -refs.html
The fix.external.refs.com.oxygenxml parameter is only supported when the DITA-OT transformation process is started from Oxygen XML Editor or using the transform script.
So the only way to use the "fix.external.refs" parameter from the command line would be this "transform" script which requires a special license and runs Oxygen transformation scenarios from the command line:
https://www.oxygenxml.com/doc/versions/ ... sform.html

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