background image

Using the Open Toolkit plug-in for FrameMaker

4

• The settings in the DITA initialization file (ditafm.ini), which determine the Apache Ant file to be 

used for different target outputs.

• Apache Ant scripts, in general, and their role in defining publishing processes that generate 

output from the DITA Open Toolkit.

• The XSLT style sheets that are used to generate HTML and other forms of output with the 

DITA Open Toolkit, as well as the other files that control the format of output, such as 
cascading style sheets.

Using the Selected Target option

A user can customize using the selected target option. The ditafm.ini file provides users with entry 
points from where they can run various Ant scripts. Also, for customizing Ant scripts, the user also 
needs to have a basic understanding of these scripts.

When you use the Selected Target option, rather than starting an Ant script that is preset to process 
the currently open file, you start an Ant script without parameters. The Ant script must contain 
explicit instructions about the following:

• Files to process

• Folders to be used for different forms of output

• Publishing methods and processes

While the Selected Target option requires more setup than the Current File option, it offers more 
fine-grained control.

About Ant scripts

Apache Ant, a Java™ application installed with the DITA Open Toolkit, is used for automating soft-
ware build processes. For example, the following types of publishing processes can be automated:

1 Transform specified XML files, such as DITA map files or associated topic files, with XSLT style 

sheets, to generate XHTML output.

2 Run a subsequent process to place these files into specific folders for deployment to a website.

With Ant, such processes are completely controlled by an Ant script or XML build file, which 
defines the following:

• All steps of the publishing process, including the processes or applications called, the target and 

destination folders and files 

• Processing sequence

Example custom Ant script

If the DITA Open Toolkit is properly installed, you should see a file named PROJECT.xml in your 
DITA_OT folder, such as C:\dita-ot1.2.\PROJECT.xml. You can define any custom publishing pro-
cesses by copying, renaming, and modifying the PROJECT.xml file. In addition, you must modify 
the DITA initialization file.

For example, to process DITA files located in the C:\Projects\Test folder, do the following:

1 Create a folder named C:\Projects\Test and copy all .dita and .xml files from the source folder to it. 

Source refers to the location where you extracted the OpenToolkit.zip file. See Appendix 2 for 
details.

2 Copy PROJECT.xml to your Open Toolkit (typically, C:\dita-ot1.4.2.1) folder and rename 

PROJECT.xml to Test.xml.

3 Open Test.xml in Windows® Notepad® (Start > Programs > Accessories > Notepad). In steps 4 

through 9, you will set the main properties indicated in the comments, which appear at the begin-
ning of the file.

Summary of Contents for FRAMEMAKER

Page 1: ...ms to the DITA structure you can use the DITA Open Toolkit to generate a wide variety of outputs The DITA Open Toolkit an Open Source tool chain for multichannel publishing DITA Open Toolkit is availa...

Page 2: ...enerate output without having to modify the Ant script However you can edit the ditafm ant xml file to customize the processing of output You must specify the path where you installed the DITA Open To...

Page 3: ...ile which is located in the output folder Compiled Help chm output You can generate compiled Help CHM easily This process is similar to generating HTML output Open the ditamap file and choose DITA Gen...

Page 4: ...used for automating soft ware build processes For example the following types of publishing processes can be automated 1 Transform specified XML files such as DITA map files or associated topic files...

Page 5: ...gs for project dita 6 Set the property value for dita extname to the extension of your referenced topic files in this case xml Property name and value settings for dita extname 7 Save and close Test x...

Page 6: ...g html txt 3 Save and close ditafm ini Now you can run the selected targets Note that Test xml is a single script that contains multiple tar gets such as CHM and HTML To run the selected targets you h...

Page 7: ...rget to an existing script as shown in the following figure Customizing the Text xml Ant script To add this target as an option in FrameMaker you can modify the DITA initialization file to refer ence...

Page 8: ...specific systems CSS style sheets that are used in HTML output Ant scripts Any other tools used in new targets This customization must be separated from the core toolkit processing For example you can...

Page 9: ...t the core of the DITA Open Toolkit is the Java Development Kit JDK which provides the base Java functionality on which most other toolkit programs depend To install the JDK 1 Go to http java sun com...

Page 10: ...create compiled Help chm files To install Microsoft HTML Help 1 Go to http msdn microsoft com library default asp url library en us htmlhelp html hwMicrosoftHTMLHelpDownloads asp make sure this is a s...

Page 11: ...the System Variables 3 Edit existing System Variables by selecting them from the list and clicking Edit Note Do not overwrite path values instead add additional paths to variables by delimiting paths...

Page 12: ...example C dita ot1 4 2 1 dost jar Set the Classpath variable to include the SAXON jar file Select the Classpath variable in the list of system variables and click Edit add a semicolon no spaces before...

Page 13: ...ts The various sets of files you need are contained in the openToolkit zip archive Follow the directions for expanding and extracting each set of files to their proper locations Installation overview...

Page 14: ...xml and PROJECT xml 2 Navigate to your DITA OT folder for example C dita ot1 4 2 1 and paste the two files Next steps Now that you ve seen the power of publishing with the Open Toolkit plug in for Fra...

Reviews: