Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6e019a662639ac6470f50dea3a4d8157 > files > 579

docbook-style-xsl-doc-1.79.2-4.mga7.noarch.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>highlight.source</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.2"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference&nbsp;Documentation"><link rel="up" href="misc.html" title="Miscellaneous"><link rel="prev" href="table.footnote.number.symbols.html" title="table.footnote.number.symbols"><link rel="next" href="highlight.xslthl.config.html" title="highlight.xslthl.config"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">highlight.source</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="table.footnote.number.symbols.html">Prev</a>&nbsp;</td><th width="60%" align="center">Miscellaneous</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="highlight.xslthl.config.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="highlight.source"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">highlight.source</span></h2><p>highlight.source &#8212; Should the content of <code class="sgmltag-element">programlisting</code>
be syntactically highlighted?</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="highlight.source.frag"></a><pre class="programlisting">
&lt;xsl:param name="highlight.source" select="0"&gt;&lt;/xsl:param&gt;
</pre></div><div class="refsection"><a name="d0e7540"></a><h2>Description</h2><p>When this parameter is non-zero, the stylesheets will try to do syntax highlighting of the 
content of <code class="sgmltag-element">programlisting</code> elements. You specify the language for each programlisting 
by using the <code class="sgmltag-attribute">language</code> attribute. The <em class="parameter"><code>highlight.default.language</code></em> 
parameter can be used to specify the language for programlistings without a <code class="sgmltag-attribute">language</code> 
attribute. Syntax highlighting also works for <code class="sgmltag-element">screen</code> and <code class="sgmltag-element">synopsis</code> elements.</p><p>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).</p><div class="itemizedlist"><p>In order to use this extension, you must</p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>add <code class="filename">xslthl-2.x.x.jar</code> to your Java classpath. The latest version is available
from <a class="link" href="http://sourceforge.net/projects/xslthl" target="_top">the XSLT syntax highlighting project</a> 
at SourceForge.</p></li><li class="listitem"><p>use a customization layer in which you import one of the following stylesheet modules: 
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p><code class="filename">html/highlight.xsl</code>
    </p></li><li class="listitem"><p><code class="filename">xhtml/highlight.xsl</code>
    </p></li><li class="listitem"><p><code class="filename">xhtml-1_1/highlight.xsl</code>
    </p></li><li class="listitem"><p><code class="filename">fo/highlight.xsl</code>
    </p></li></ul></div><p>
</p></li><li class="listitem"><p>let either the <code class="literal">xslthl.config</code> Java system property or the
<em class="parameter"><code>highlight.xslthl.config</code></em> parameter point to the configuration file for syntax 
highlighting (using URL syntax). DocBook XSL comes with a ready-to-use configuration file, 
<code class="filename">highlighting/xslthl-config.xml</code>.</p></li></ul></div><p>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.)</p><p>The following is an example of a Saxon 6 command adapted for syntax highlighting, to be used on Windows:</p><div class="informalexample"><p><span class="command"><strong>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</strong></span></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="table.footnote.number.symbols.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="misc.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="highlight.xslthl.config.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">table.footnote.number.symbols&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;highlight.xslthl.config</td></tr></table></div></body></html>