X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0c9c28efcd43f53ac54aa60b2dfefa69c70dbadf..6b6d9b29e9e9e91f79507a8bf193fb30de311dcc:/doc/help/xslt/params/highlight.source.xml diff --git a/doc/help/xslt/params/highlight.source.xml b/doc/help/xslt/params/highlight.source.xml new file mode 100644 index 00000000..41d7b2f8 --- /dev/null +++ b/doc/help/xslt/params/highlight.source.xml @@ -0,0 +1,82 @@ + + +highlight.source +boolean + + +highlight.source +Should the content of programlisting +be syntactically highlighted? + + + + + + + + +Description + +When this parameter is non-zero, the stylesheets will try to do syntax highlighting of the +content of programlisting elements. You specify the language for each programlisting +by using the language attribute. The highlight.default.language +parameter can be used to specify the language for programlistings without a language +attribute. Syntax highlighting also works for screen and synopsis elements. + +The actual highlighting work is done by the XSLTHL extension module. This is an external Java library that has to be +downloaded separately (see below). + + +In order to use this extension, you must + +add xslthl-2.x.x.jar to your Java classpath. The latest version is available +from the XSLT syntax highlighting project +at SourceForge. + + +use a customization layer in which you import one of the following stylesheet modules: + + + html/highlight.xsl + + + + xhtml/highlight.xsl + + + + xhtml-1_1/highlight.xsl + + + + fo/highlight.xsl + + + + + +let either the xslthl.config Java system property or the +highlight.xslthl.config parameter point to the configuration file for syntax +highlighting (using URL syntax). DocBook XSL comes with a ready-to-use configuration file, +highlighting/xslthl-config.xml. + + + +The extension works with Saxon 6.5.x and Xalan-J. (Saxon 8.5 or later is also supported, but since it is +an XSLT 2.0 processor it is not guaranteed to work with DocBook XSL in all circumstances.) + +The following is an example of a Saxon 6 command adapted for syntax highlighting, to be used on Windows: + + +java -cp c:/Java/saxon.jar;c:/Java/xslthl-2.0.1.jar +-Dxslthl.config=file:///c:/docbook-xsl/highlighting/xslthl-config.xml com.icl.saxon.StyleSheet +-o test.html test.xml myhtml.xsl + + + +