Menu

Overview

Michiel Hendriks

XSLT syntax highlighting

This is an implementation of syntax highlighting as an extension module for XSLT processors, so if you have e.g. article about programming written in DocBook, code examples can be automatically syntax highlighted during the XSLT processing phase.

Usage

This tool is to be used from an XSLT stylesheet. It can not be used as a stand-alone tool. This tool depends on a binding to a with an XSLT processor like Xalan or Saxon (both 6.5, 8.5+, 9+). More information on how to use this tool can be found in this document.

Highlighters

This tool comes with a standard set of highlighters for various languages or file formats. How to add a new syntax highlighter is explained in this document.

The following programming languages/formats are supported out of the box:

  • Java
  • ini files
  • PHP
  • Pascal/Delphi
  • Modula 2
  • XML (built-in highlighter, always available)
  • HTML (built-in highlighter, always available)
  • C
  • C#
  • Tcl
  • Perl
  • Python
  • Ruby
  • JavaScript
  • C++
  • Shell
  • CMake
  • CSS
  • Lua
  • SQL (various versions)
  • Unified Parallel C

Examples

The results of the processed examples can be found in this directory.


Related

Wiki: Home
Wiki: Syntax Highlighters
Wiki: Usage