Start transformation scenario from command line

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Daniel09
Posts: 3
Joined: Thu Apr 05, 2018 5:50 pm

Start transformation scenario from command line

Post by Daniel09 »

Hi

We are using Oxygen XML Author 19.0 to generate the documentation for our project. The sources are in DocBook format and we generate the output in HTML and PDF. To automate our build we need to start the different transformation scenarios from a script outside the GUI.

Is this possible? And when yes, how? I couldn't find any information in the documentation (except for DITA, which I don't know).

Thanks,
Daniel
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Start transformation scenario from command line

Post by Radu »

Hi Daniel,

Oxygen's transformation scenarios use the Saxon 6 processor to apply an XSLT stylesheet over an XML document.
You can also do that from the command line by downloading the Saxon 6 processor:

http://www.sagehill.net/docbookxsl/Inst ... essor.html

You can use the XSLT stylesheets from OXYGEN_INSTALL_DIR\frameworks\docbook\xsl or download them from here:

https://sourceforge.net/projects/docboo ... cbook-xsl/

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Start transformation scenario from command line

Post by Radu »

One more thing, there is also a free Docbook Apps Users List to which you can register and ask Docbook publishing-related questions:

https://docbook.org/help

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Daniel09
Posts: 3
Joined: Thu Apr 05, 2018 5:50 pm

Re: Start transformation scenario from command line

Post by Daniel09 »

Hi Radu,

Thanks a lot for the links! I will try that out.

Some additional questions. In the "Edit scenario" window in Oxygen XML Author we have 21 parameters configured. Are they parameters for Saxon i.e. can I use them on the command line? And does Oxygen add more parameters to the call?

Regards,
Daniel
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Start transformation scenario from command line

Post by Radu »

Hi Daniel,

All the parameters which are assigned values in the Oxygen transformation scenario UI (in the Parameters list) are later passed to the Saxon XSLT processor as parameters.
You can also pass parameters via the command line like:

Code: Select all

java  com.icl.saxon.StyleSheet  -o myfile.html  myfile.xml  docbook-xsl/html/docbook.xsl  use.extensions=1 admon.graphics=1
where the "use.extensions" and "admon.graphics" are the passed parameters, what goes after "=" being of course their value.
As an alternative you can can create your own XSLT stylesheet which imports the Docbook XSLT stylesheet but in addition sets some default values for certain xsl:params.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Daniel09
Posts: 3
Joined: Thu Apr 05, 2018 5:50 pm

Re: Start transformation scenario from command line

Post by Daniel09 »

Hi Radu,

Thanks, I will look into that.

Regards,
Daniel
Post Reply