Highlight content of ProgramListing using XSieve and Vim. Example:
DocBook |
<programlisting role="xml"> <para>Hello, <emphasis>&who;</emphasis >!</para> <co id="who-entity"/> </programlisting> |
---|---|
HTML result |
<para>Hello, &who;!</para> (1) |
Set the correct path to the script vimcolor-wrapper in colorer.xsl.
Create an XSLT wrapper which imports DocBook and colorer stylesheets:
<xsl:stylesheet ...> ... <xsl:import href="..../docbook.xsl"> (1) <xsl:import href="..../colorer.xsl"> (2) <xsl:import href="..../colorer-html.xsl"> (3) ... Your DocBook customization layer ... </xsl:stylesheet>
(1) The path to the DocBook XSLT stylesheet. For example, /usr/share/xml/docbook/xsl-stylesheets/html/docbook.xsl
(2) The path to the colorer XSLT stylesheet.
(3) Or colorer-fo.xsl for FO output.
The package contains test files test.xml, testdoc.xsl and testdoc.html. Use them as the starting point:
xsieve -o testdoc.html --param callout.graphics 0 testdoc.xsl test.xml