Getting Started with DITA for Print ...

184 views
Skip to first unread message

mrob

unread,
Feb 7, 2015, 2:55:13 AM2/7/15
to dita-o...@googlegroups.com
I'm trying to get started with the book DITA for Print, but am unable to get a custom plugin working.

I've been working with DITA for a number of years, and am hoping to automate my workflow. This book looks ideal, though to be honest, I feel the instructions in a few passages are not entirely clear, at least for a relative noob to DITA-OT.

I'm using a Win 7 machine, and to eliminate any possible problems, I'm using version 1.8 of the DITA-OT. I have also looked at the errata for the book, and tried to follow the revisions described there. Still, I am stuck.

I have followed the steps in chapter 2 to create my plugin directory com.mycompany.mypdf, containing a plugin.xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.mycompany.mypdf">
    <require plugin="org.dita.pdf2"/>
    <feature extension="dita.conductor.transtype.check" value="mypdf"/>
    <feature extension="dita.transtype.print" value="mypdf"/>
    <feature extension="dita.conductor.target.relative" file="build.xml"/>
</plugin>

The first line of build_custpdf_template file looks like this:

<project name="com.mycompany.mypdf" default="dita2custpdf">

The instructions for setting up this file (p. 44) are a little unclear to me. The previous examples indicate in bold face which parts of the file I should edit, but the XML in step 16 on p. 43 doesn't include any bold face. Nevertheless, I assume that I am supposed to edit the project name to the name of my plugin directory (as above).

After this is done, I run ant -f integrator.xml and get BUILD SUCCESSFUL. However, I do not find a build_custpdf.xml file in my plugin directory, as the instructions on p. 44 suggest.

Next, when I try to run my ant build file, created per the steps on pp. 51-56, I get the error:

Target "dita2mypdf" does not exist in the project "DOST".

There is a brief discussion of the target element on p. 44, but it doesn't clearly state that I should change this. On a hunch, I tried: target name="dita2mypdf", and now the build runs further, but again fails, this time with:

A source file is missing :C:\Users\me\Buildfiles\${dita.plugin.com.company.custpdf.dir}\cfg

At this point, I'm just guessing randomly about what I need to do next, so I am hoping somebody on this group could help.

Questions:

(1) What EXACTLY should I change in build_custpdf_template.xml?

(2) Is there some way to troubleshoot the missing build_custpdf.xml file?

(3) Should I rename the file build_custpdf_template.xml to build_mypdf_template.xml, and change the corresponding import in build.xml?

Thanks in advance!

mrob

unread,
Feb 7, 2015, 10:41:52 AM2/7/15
to dita-o...@googlegroups.com
Update: following a very helpful suggestion, I tried adding this to the plugin.xml file:

<template file="build_mypdf_template.xml/>

By adding this element, I now finally see build_custpdf.xml in my plugin directory after I run the integrator.

This is not described in the discussion of plugin.xml on p. 43 of the book, nor is it mentioned in the errata.

Through trial and error, I had to make a few other changes to the build_custpdf_template.xml file, which were not explained in the book.

In any case, it seems I am maybe past this hurdle, though I'm guessing there will be more.
Reply all
Reply to author
Forward
0 new messages