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 http://sourceforge.net/projects/jedit-syntax/.
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |