From: Mauritz Jeanson Date: Sat, 7 Mar 2009 19:21:01 +0000 (+0000) Subject: Updated and reorganized the description. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74c06f48e052d00e7ee2254f8846bc1d8fe5b77b;p=docbook-dsssl Updated and reorganized the description. --- diff --git a/xsl/params/highlight.source.xml b/xsl/params/highlight.source.xml index 91f56194e..e10460eb0 100644 --- a/xsl/params/highlight.source.xml +++ b/xsl/params/highlight.source.xml @@ -1,47 +1,75 @@ - - -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 the programlisting element. The highlighting is done by the -XSLTHL extension module. This is an external Java library which is not part of the DocBook XSL distribution. - -In order to use this extension, you must add -xslthl-2.0.0.jar to your Java classpath. You can -download this software from the XSLT syntax highlighting project at SourceForge. - -The configuration of syntax highlighting is stored in -highlighting/xslthl-config.xml. The Java -property xslthl.config or parameter highlight.xslthl.config must point to this -file (using URL syntax). - -This extension is known to work with Saxon 6.5.x, Saxon 8.5+ and Xalan-J. Here is an example of a modified Saxon command: - -java -cp c:\batch\;…;c:\path\to\xslthl-2.0.0.jar -Dxslthl.config=file:///c:/docbook-xsl/highlighting/xslthl-config.xml … com.icl.saxon.StyleSheet … - -You can specify the language for each programlisting by using the language attribute. The -highlight.default.language parameter can be used for specifying the -language to be used for programlistings without a language attribute. - - - + + +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 two stylesheet modules: + + + highlighting/common.xsl + + + one of the following: + 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 + + + +