Need a concrete example of a custom build file

MarkAStevens_at_GE
Posts: 6
Joined: Tue Oct 01, 2019 7:23 pm

Need a concrete example of a custom build file

Post by MarkAStevens_at_GE » Mon Dec 16, 2019 11:12 pm

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

Radu
Posts: 6683
Joined: Fri Jul 09, 2004 5:18 pm

Re: Need a concrete example of a custom build file

Post by Radu » Thu Dec 19, 2019 11:02 am

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

MarkAStevens_at_GE
Posts: 6
Joined: Tue Oct 01, 2019 7:23 pm

Re: Need a concrete example of a custom build file

Post by MarkAStevens_at_GE » Fri Jan 03, 2020 7:15 pm

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.

chrispitude
Posts: 105
Joined: Thu May 02, 2019 2:32 pm

Re: Need a concrete example of a custom build file

Post by chrispitude » Mon Jan 06, 2020 12:32 pm

Hi Mark,

I was able to get a working build file here:

topic20945.html

Hopefully this helps!

- Chris

Post Reply