ANT4DOCBOOK - ant task for docbook


What is it ?

Ant4docbook is an ant task for processing docbook xml documents.
DocBook is a semantic markup language for writing technical documentation :

<?xml version="1.0" encoding="utf-8"?>
<article xml:lang="en" xmlns:xi="">

  <title>My first docbook article</title>
  <section id="section1">
    <title>Section level 1</title>
      write your documentation


Apache Ant is a xml tool for writing scripts :

<project name="ant-project" default="todo"> 

  <target name="todo"> 
    <!-- define ant task here, such as <dbk> task -->
    <dbk file="docbook.xml" tofile="file.html">


Please see : documentation for descriptions and samples.

Why ?

Why another docbook processing tool when there are already many ones ?
Even if these tools do their jobs as they have to do, it is sometimes quiet difficult to install/use/customize them.
Ant4docbook aims to be :

  • easy to use.
  • easy to install.
    Ant4docbook package contains all tools and dependencies
  • easy to customize
  • cross platform


  • [2016-01-03] ant for docbook V0.8.0 released.

    Features :

    • docbook + graphics (Plantuml)
    • process markdown as an input file

    Bugs :

    • BUG#031 : FOUserAgent: Image not found.
      *ERROR* FOUserAgent: Image not found. URI: <path/to/file>.png. (No context info available)
      Correction: Use the input file as reference, instead of project base dir for fo proc.


    • Use docbook xsl v1.78.1 => v1.79.1
    • Use fop v1.1 => v2.0 (and xmlgraphics v2.0.1)

  • [2014-07-09] ant for docbook V0.7.1 released.


  • [2014-04-06] ant for docbook V0.7 released.


    • docbook + plain text content (markdown)

  • [2014-01-05] ant for docbook V0.6 released.


    • dbk to epub processing


    • [BUG#011] XInclude fails when using DOCTYPE in included xml files
    • [BUG#016] FileNotFoundException: /path/to/docbookx.dtd
    • [BUG#022] *ERROR* FOUserAgent: Invalid property value encountered in column-width="10%%"


    • Use docbook xsl v1.78.0 => v1.78.1
    • Use fop v1.0 => v1.1 (and xmlgraphics v1.5)
    • Use org.jdom.jdom V1.1 => V2.0.2
    • Use Saxon instead of Xalan
      [dbk-xslt] FATAL ERROR: Xalan processor not supported by DocBook Epub3 stylesheets. Xalan does not properly support XSL output method="text", which is required for the various epub support files.

  • [2012-12-16] ant for docbook V0.5 released.


    • dbk preprocessing with freemarker engine

  • [2012-07-01] ant for docbook V0.4 released.


    • dbk to pdf images processing


    • [BUG#005] Image not available. Reason: org.apache.xmlgraphics.image.loader. ImageException: The file format is not supported
    • [BUG#006] Release fix for "The file format is not supported. No ImagePreloader found

  • [2011-09-25] ant for docbook V0.3 released.


    • dbk to pdf customization with parameters

  • [2011-03-27] ant for docbook V0.2 released.


    • dbk to html and pdf processing


    • [BUG#004] Xslt processing failed with default JRE (thanks to Susanne Wunsch)
    • [BUG#003] fo processing failure, due to windows directory permissions
    • [BUG#002] xinclude failure on windows
    • [BUG#001] java.lang.NoClassDefFoundError: org/jdom/Document