background preloader

DITA Ressources

Facebook Twitter

Agora.unige.ch/guides/tie/pdf/files/xml-xslt.pdf. Creating PDF files from DITA content. The DITA OT with an XSL-FO processor is a commonly considered solution. The DITA OT comes with XSL-FO transforms, which are run on the DITA XML to produce an FO file. The FO file contains the DITA content and instructions about how the content should be formatted. The XSL-FO processor then converts the FO to a PDF file.

All PDF file formatting is controlled by the DITA OT XSL-FO. You edit the XSL-FO in an XML editor to modify the formatting. For example, Figure 1 shows the FO for calculating table column widths. Figure 1: Example of XSL-FO in the DITA OT With respect to page layout sophistication, automation, and cost, the DITA OT and XSL-FO option provides the following: Generic but moderately customizable output. Figure 2: A PDF file produced in the DITA OT 1.5 using FOP If the plain PDF file shown in Figure 2 doesn’t meet your needs, you’ll modify the XSL-FO to customize components such as headers and footers, logos, and attractive fonts.

XSL Formatter. Writing Ant Build Files DITA-OT. Learning how buildfiles tell Ant what and how to compile. Customize the Default Ant Script The sample Ant build scripts provided by the DITA-OT may not be adequate to meet the needs of your documentation project. This topic describes how to customize the default scripts and write your own. The DITA Open Toolkit contains sample build files for both the DITA-OT and sample documentation. Writers new to the toolkit use the sample_all.xml Ant build script to create all the sample documents that come with DITA-OT. The toolkit also contains build scripts for individual ouput types, such as sample_pdf.xml. Here is the Ant project definition from template_pdf.xml You simply change the values of the following properties to match the values used in your project: Project name: The root element in an Ant build file.

Write Your Own Ant Script The default build script may not meet the needs of your project for a range of reasons: You need to cutomize or write your own build file for these use cases. DITA Open Toolkit. Editing XSLT Stylesheets. Www.ditausers.org/tutorials/lone-dita/ditaguide.pdf.