Syntax highlighting

It is sometimes desirable to add syntax highlighting to code listings. Syntax highlighting adds formatting attributes to keywords and punctuation in a way that makes it easier for the reader to separate code from text. The stock DocBook XSL stylesheets do not provide this feature, because the string parsing capability of XSLT 1.0 is limited.

However, there exists a Saxon extension that can do syntax highlighting during an XSLT transformation. If you are using the Saxon XSLT processor, then you should check out the jEdit Syntax Package at