Page 1 of 1
Stop dita transformation on cetain point
Posted: Wed Jul 20, 2016 2:16 pm
by RoxieRocks
Hello, not long time ago I have started to use dita-ot, and got one question.
Now, I am using customised pdf plugin that applies some xsl code on _MERGED.xml from temp directory and creates another xml file (ant script in plugin's integrator.xml does it), so I dont need to have the actual pdf output, just this merged file that is created while transforming.
The procces now is: starting the transformation,waiting about 1 minute for transformation to complet, pdf opens, my ant targets are implemented
The question: is it possible somehow to stop the transformation just after the _MERGED.xml is created and not wait until the end? Using ant, for example? or just prevent pdf file to open also will work fine for me
I appreciate any help
thank you
Re: Stop dita transformation on cetain point
Posted: Wed Jul 20, 2016 2:36 pm
by Radu
Hi,
If you edit the Oxygen transformation scenario, in the
Output tab you can uncheck the setting which instructs Oxygen to open the result file:
https://www.oxygenxml.com/doc/versions/ ... utput.html
The merged file is obtained in the build file:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT2.x/plugins/org.dita.pdf2/build.xml
which at some point does something like:
Code: Select all
<target name="map2pdf2" unless="noMap">
<dirname property="dita.temp.dir.fullpath" file="${dita.temp.dir}${file.separator}dummy.file"/>
<pipeline message="topicmerge" taskname="topic-merge" inputmap="${dita.temp.dir.fullpath}${file.separator}${user.input.file}" tempdir="${dita.temp.dir.fullpath}">
<module class="org.dita.dost.module.TopicMergeModule">
<param name="output" location="${dita.temp.dir.fullpath}${file.separator}${dita.map.filename.root}_MERGED.xml"/>
<param name="style" location="${dita.plugin.org.dita.pdf2.dir}/xsl/common/topicmerge.xsl"/>
</module>
</pipeline>
<antcall target="publish.map.pdf"/>
</target>
so possibly you can copy the DITA OT PDF plugin and create your own plugin which no longer obtains XSL-FO output, it stops at the merging phase.
Regards,
Radu
Re: Stop dita transformation on cetain point
Posted: Wed Jul 20, 2016 3:01 pm
by RoxieRocks
Thank you for this ideas, Rady. I will try it out, hope will get a result that I am aiming at.
Re: Stop dita transformation on cetain point
Posted: Thu Jul 21, 2016 12:07 pm
by Radu
Hi,
I uploaded a simple DITA OT plugin which produces the merged output without additional XSLT stylesheets applied and without producing a PDF:
https://github.com/oxygenxml/dita-merged
It's transtype is called "merged", you could try to integrate it in the DITA OT that you use and give it a try.
Regards,
Radu
Re: Stop dita transformation on cetain point
Posted: Thu Jul 28, 2016 12:47 pm
by RoxieRocks
Thank you, Radu, it works! Instead of over 1 minute, the process takes about 12 seconds now for me

Re: Stop dita transformation on cetain point
Posted: Thu Jul 28, 2016 1:20 pm
by Radu
Hi,
Great, I'm glad you find it useful. Oxygen 18.1 (Autumn this year) will have this plugin bundled by default with its DITA OT distributions.
Regards,
Radu