Stop dita transformation on cetain point

Post here questions and problems related to editing and publishing DITA content.
RoxieRocks
Posts: 5
Joined: Thu Jul 07, 2016 10:39 am

Stop dita transformation on cetain point

Post 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
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Stop dita transformation on cetain point

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RoxieRocks
Posts: 5
Joined: Thu Jul 07, 2016 10:39 am

Re: Stop dita transformation on cetain point

Post by RoxieRocks »

Thank you for this ideas, Rady. I will try it out, hope will get a result that I am aiming at.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Stop dita transformation on cetain point

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RoxieRocks
Posts: 5
Joined: Thu Jul 07, 2016 10:39 am

Re: Stop dita transformation on cetain point

Post by RoxieRocks »

Thank you, Radu, it works! Instead of over 1 minute, the process takes about 12 seconds now for me :D
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Stop dita transformation on cetain point

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply