Hello All,
It seems that by default, keywords are bold. In addition to that,
I want to make keywords blue and comments green. I copied the code
to do it from
http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html,
but it is not working. The text in the program listing is bold
but black.
My customisation layer looks like this:
?xml version=1.0 encoding=UTF-8?
xsl:stylesheet
version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:xslthl=http://xslthl.sf.net;
exclude-result-prefixes=xslthl
xsl:import
href=file:///c:/mingw/local/share/docbook-xsl-ns-1.78.1/fo/docbook.xsl /
xsl:import
href=file:///c:/mingw/local/share/docbook-xsl-ns-1.78.1/fo/highlight.xsl /
xsl:param name=highlight.source select=1/
xsl:template match=xslthl:keyword
fo:inline font-weight=bold color=bluexsl:apply-templates//fo:inline
/xsl:template
xsl:template match=xslthl:comment
fo:inline font-style=italic
color=greenxsl:apply-templates//fo:inline
/xsl:template
/xsl:stylesheet
The relevant section of my DocBook 5.0 sub-document (XIncluded in main
document notes.xml) is
programlisting language=sql92
...
/programlisting
I transform notes.xml like this:
xmllint --xinclude -o notesi.xml notes.xml
%JAVA% -cp %CLASSPATH% -Dxslthl.config=/path/to/xslthl-config.xml
com.icl.saxon.Stylesheet -o notes.fo notesi.xml notes.xsl
%FOP% notes.fo notes.pdf
What am I doing wrong?
Regards,
John Brown.
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org