Page 1 of 1

Need a concrete example of a custom build file

Posted: Mon Dec 16, 2019 11:12 pm
by MarkAStevens_at_GE
Hi,

I'm trying to add a custom script in front of a transformation scenario based on a "DITA Map to PDF wuth HTML5 & CSS" template. I've looked at the documentation at https://www.oxygenxml.com/doc/versions/ ... -file.html and several similar threads on this forum, but can't figure out exactly how to do this.

I have my customized template saved in "C:\Perforce\TechWriting\PublishingTemplates\DITAmapToPDF\".

What parameters would I specify for project basedir, import file, target name, and antcall target in the following example script.

Code: Select all

<project basedir="." default="dist">
<!--The DITA OT default build file-->
 <import file="build.xml"/>
 <target name="dist">
  <!-- You could run your script here -->
  <!--<exec></exec>-->
   <!--Call the DITA OT default target-->
   <antcall target="init"/>
 </target>
</project>
(Note: the exec portion in the middle is not a problem. I can figure out how to do that.)

Thanks,
Mark

Re: Need a concrete example of a custom build file

Posted: Thu Dec 19, 2019 11:02 am
by Radu
Hi Mark,

When I originally wrote that topic in the user's manual that you are following I considered that somebody can create a "build_custom.xml" file and save it next to the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT3.x\build.xml. The contents of the "build_custom.xml" should be exactly the one that I exemplified in the user's guide. After this you can edit the transformation scenario and in the "Advanced" tab set the "Custom build file" to point to the location of the "build_custom.xml".

Anyway, I think your main purpose is to run the entire thing from a command line. And for this it's probably better to use the "dita" executable to start the DITA OT process:

https://www.dita-ot.org/dev/topics/buil ... mmand.html

If you want to start the DITA OT processing from an ANT build file you can also run the "dita" executable from the build file:

https://www.dita-ot.org/dev/topics/migr ... -dita.html

Regards,
Radu

Re: Need a concrete example of a custom build file

Posted: Fri Jan 03, 2020 7:15 pm
by MarkAStevens_at_GE
Thanks Radu. That's the information I needed.

As for launching from the command line, that's not going to help in this particular instance, but will help for something else I'm working on.

Re: Need a concrete example of a custom build file

Posted: Mon Jan 06, 2020 12:32 pm
by chrispitude
Hi Mark,

I was able to get a working build file here:

topic20945.html

Hopefully this helps!

- Chris