RenderX

Chapter 20 of the IREn User Guide

DocBook Support

J.1. Processing DocBook Document

To process a DocBook (http://www.docbook.org) document use the xep shell (or xep.bat on Windows) command syntax or IREn Assistant putting DocBook document instead of XML source document. Use fo/docbook.xsl stylesheet file from the DocBook XSL Stylesheets distribution to specify it as XSL stylesheet. The DocBook XSL Stylesheets distribution is available at http://wiki.docbook.org/topic/DocBookXslStylesheets. Any release of DocBook XSL can be used. Recommended versions are docbook-xsl-1.69.1 and higher.

J.2. Using Catalogs for DocBook

Validating DocBook document may require downloading DocBook stylesheets on every use. As discussed in Section 5.3, it is possible to improve the performance by adding XML Catalog.

If necessary of using a catalog in XML provide a mapping from generic addresses to specific local directories on a given machine use Norman Walsh's catalog library: Download the resolver.jar file from http://xml.apache.org/commons/dist/ (it may have a version number in the filename) and copy it to a convenient location.

Next create a CatalogManager.properties file in a directory that will be included in your CLASSPATH.

The resolver will look in this file to determine the locations of the catalog files.

The next example shows a properties file that loads the catalog named catalog.xml from the current working directory and the standard DocBook catalog from the absolute path /usr/local/xml/docbook/docbook.cat.

catalogs=catalog.xml;/usr/local/xml/docbook/docbook.cat
relative-catalogs=true
static-catalog=yes
catalog-class-name=org.apache.xml.resolver.Resolver
verbosity=1

To know how to write XML catalog in detail see http://www.sagehill.net/docbookxsl/Catalogs.html

Next browse to the IREn installation directory and edit one of IREn commands which will be used for the catalog file. Add in one of the xep.bat or xep, x4u.bat or x4u scrpts like the following:

  • specify additional paths in your CLASSPATH environment variable of the java command to $XEP_HOME/lib/crimson.jar, downloaded resolver.jar and the CatalogManager.properties file's directory;
  • set additional parameters in the Java command like the following:
    1. "-Xmx256M" (optional, can be more or less than 256 Mb )

    2. "-Dcom.renderx.sax.entityresolver=com.sun.resolver.tools.CatalogResolver"

    3. "-Dcom.renderx.jaxp.uriresolver=com.sun.resolver.tools.CatalogResolver"

If everything is done as mentioned above, use the changed IREn command with usual syntax.

Download the complete IREn User Guide as PDF