Automatically start a new transformation after another

Post here questions and problems related to editing and publishing DITA content.
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

Automatically start a new transformation after another

Post by gbv34 »

Hello,
I am currently in a situation where I need, first, to apply a normalized DITA transformation. Then, with the source created, automatically start a second transformation with the new generated map and applying an HTML5 transtype.

Currently, my build.xml takes this form and I just would like to make sure I am on the right track:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project name="build-dita-html5" default="all" basedir=".">
  <target name="all" description="build dita and html5" depends="dita,html5"/>
  <target name="dita" description="build DITA">
    <ant antfile="${dita.dir}/build.xml">
      <property name="args.input" location="../tzmp-test.ditamap"/>
      <property name="transtype" value="dita"/>
      <property name="output.dir" location="../out/dita"/>
      <property name="args.gen.task.lbl" value="YES"/>
    </ant>
  </target>
  <target name="html5" description="build html5">
    <ant antfile="${dita.dir}/build.xml">
      <property name="args.input" location="../out/dita/tzmp-test.ditamap"/>
      <property name="transtype" value="html5"/>
      <property name="output.dir" location="../out/html5"/>
      <property name="args.gen.task.lbl" value="YES"/>  
      <property name="args.rellinks" value="nofamily"/>
    </ant>
  </target>
</project>
Does it sound correct to you?
------
Gaspard
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Automatically start a new transformation after another

Post by Radu »

Hi,

So your custom build file is one level above the main DITA OT build file. I guess that's one way to do it. Possibly also a single custom DITA OT plugin which a custom transformation type could be built for this, in order to avoid having an extra build file which calls the DITA OT main build file.
I do not understand the "why", why run the DITA normalization before applying the HTML processing? I think you obtain exactly the same thing if you directly apply just HTML processing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

Re: Automatically start a new transformation after another

Post by gbv34 »

That is a pretty good question, Radu.
Actually, I pushed content to a publishing delivery platform and I noticed extra processing was applied to the content after the DITA-OT processing. Typically, in my case, I've created a plugin that overrides the display of the title and adds additional metadata values in it. However, if my plugin works well locally, once my plugin is integrated in the remote DITA-OT, I noticed the title remained unaffected. I got confirmation from the developers the title is pulled from the ditamap and my transformation is dismissed for the title element.

A potential workaround would consist in publishing the DITA publication first as DITA, getting the ditamap with the modified title, then publishing the new created map as HTML5.
------
Gaspard
Post Reply