Extensions for Saxon and Xalan
- 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 above tasks are either impractical or impossible to implement with standard XSLT 1.0 only.
The extensions are written in Java and they can be used with Saxon and Xalan-Java. For specific how-to instructions on using them, see the DocBook Saxon extensions and DocBook Xalan extensions sections in DocBook XSL: The Complete Guide.
Basically, 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/saxon65.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).