Update 2008-07-10: I joined the xslthl project, you can expect an new release soon with these changes and much much more.
Xslthl is an XSLT extention that adds syntax highlighting functionality. However, the project has some limitations and is currently no actively maintained. On this page you will find a modified version of the xslthl project that addesses some of these issues.
The following things have been changed:
xmlns:xhl="xalan://net.sf.xslthl.XalanConnector".
After this you will be able to call the highlight function like this:
<xsl:apply-templates select="xhl:highlight($language, exsl:node-set(.))"/>
<programlisting language="java">
class MyClass
{
private int foo; <co xml:id="example.myclass.foo" />
}
</programlisting>
After highlighting the <co ... /> is still in the result and available for further processing.
Previously only the syntax highlighted XML nodes were returned.
This is very useful when using Xslthl with DocBook.
@[a-z]+".
This problem is reduced in this version.
For example @if will not be highlighted by the previously listed regex matcher.