The DocBook XSLT extensions are a set of DocBook-specific XSLT extensions created by NormanWalsh for performing a variety of tasks that would be impractical to implement with standard XSLT only:
- Embed callouts in verbatim environments (program listings, for example)
- Add line numbers to verbatim environments (program listings, for example)
- Adjust the width of table columns in HTML output to match specs in the CALS table source
- Directly include contents of a text file in rendered output
- Determine the intrinsic size of an image
The extensions are written in Java and they can be used with Saxon and Xalan-Java. To use the extensions, you need to
determine which extension jar file (in the extensions directory in the DocBookXslStylesheets distribution) corresponds most closely to the Java XSLT engine you use
- include the name of that jar file in your Java classpath
set the correct XSLT extension parameters to enable the behavior you need. Here is documentation for the parameters for HTML output.
For example, if you are using Saxon 6.5.3, include the extensions/saxon653.jar file in your Java classpath, and (at a minimum) set the value of the use.extensions parameter to 1 (instead of the default 0).
You can't use the DocBook XSLT extensions described above with XsltProc because that processor is written in C. Extensions for xsltproc can be written in a scripting language, for example Python. There is in fact a preliminary Python implementation of the column width adjustment function in the DocBook SVN repository at SourceForge, but it has not been officially released. See also this mailing list post.
DocBook Wiki