]> git.stg.codes - stg.git/blob - doc/xslt/html/highlight.xsl
Set output encoding to utf-8.
[stg.git] / doc / xslt / html / highlight.xsl
1 <?xml version="1.0"?>\r
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslthl="http://xslthl.sf.net" exclude-result-prefixes="xslthl" version="1.0">\r
3   <!-- ********************************************************************\r
4      $Id: highlight.xsl 8911 2010-09-28 17:02:06Z abdelazer $\r
5      ********************************************************************\r
6 \r
7      This file is part of the XSL DocBook Stylesheet distribution.\r
8      See ../README or http://docbook.sf.net/release/xsl/current/ for\r
9      and other information.\r
10 \r
11      ******************************************************************** -->\r
12   <xsl:import href="../highlighting/common.xsl"/>\r
13   <xsl:template match="xslthl:keyword" mode="xslthl">\r
14     <strong class="hl-keyword">\r
15       <xsl:apply-templates mode="xslthl"/>\r
16     </strong>\r
17   </xsl:template>\r
18   <xsl:template match="xslthl:string" mode="xslthl">\r
19     <strong class="hl-string">\r
20       <em style="color:red">\r
21         <xsl:apply-templates mode="xslthl"/>\r
22       </em>\r
23     </strong>\r
24   </xsl:template>\r
25   <xsl:template match="xslthl:comment" mode="xslthl">\r
26     <em class="hl-comment" style="color: silver">\r
27       <xsl:apply-templates mode="xslthl"/>\r
28     </em>\r
29   </xsl:template>\r
30   <xsl:template match="xslthl:directive" mode="xslthl">\r
31     <span class="hl-directive" style="color: maroon">\r
32       <xsl:apply-templates mode="xslthl"/>\r
33     </span>\r
34   </xsl:template>\r
35   <xsl:template match="xslthl:tag" mode="xslthl">\r
36     <strong class="hl-tag" style="color: #000096">\r
37       <xsl:apply-templates mode="xslthl"/>\r
38     </strong>\r
39   </xsl:template>\r
40   <xsl:template match="xslthl:attribute" mode="xslthl">\r
41     <span class="hl-attribute" style="color: #F5844C">\r
42       <xsl:apply-templates mode="xslthl"/>\r
43     </span>\r
44   </xsl:template>\r
45   <xsl:template match="xslthl:value" mode="xslthl">\r
46     <span class="hl-value" style="color: #993300">\r
47       <xsl:apply-templates mode="xslthl"/>\r
48     </span>\r
49   </xsl:template>\r
50   <xsl:template match="xslthl:html" mode="xslthl">\r
51     <strong>\r
52       <em style="color: red">\r
53         <xsl:apply-templates mode="xslthl"/>\r
54       </em>\r
55     </strong>\r
56   </xsl:template>\r
57   <xsl:template match="xslthl:xslt" mode="xslthl">\r
58     <strong style="color: #0066FF">\r
59       <xsl:apply-templates mode="xslthl"/>\r
60     </strong>\r
61   </xsl:template>\r
62   <!-- Not emitted since XSLTHL 2.0 -->\r
63   <xsl:template match="xslthl:section" mode="xslthl">\r
64     <strong>\r
65       <xsl:apply-templates mode="xslthl"/>\r
66     </strong>\r
67   </xsl:template>\r
68   <xsl:template match="xslthl:number" mode="xslthl">\r
69     <span class="hl-number">\r
70       <xsl:apply-templates mode="xslthl"/>\r
71     </span>\r
72   </xsl:template>\r
73   <xsl:template match="xslthl:annotation" mode="xslthl">\r
74     <em>\r
75       <span class="hl-annotation" style="color: gray">\r
76         <xsl:apply-templates mode="xslthl"/>\r
77       </span>\r
78     </em>\r
79   </xsl:template>\r
80   <!-- Not sure which element will be in final XSLTHL 2.0 -->\r
81   <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl">\r
82     <strong class="hl-tag" style="color: blue">\r
83       <xsl:apply-templates mode="xslthl"/>\r
84     </strong>\r
85   </xsl:template>\r
86 </xsl:stylesheet>\r