Debian Codegraph @

docs/xsl-generic/html/changebars.xsl

raw
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="1.0">
4
5 <!-- ********************************************************************
6 $Id: changebars.xsl 6910 2007-06-28 23:23:30Z xmldoc $
7 ********************************************************************
8
9 This file is part of the XSL DocBook Stylesheet distribution.
10 See ../README or http://docbook.sf.net/release/xsl/current/ for
11 copyright and other information.
12
13 ******************************************************************** -->
14
15 <!-- ==================================================================== -->
16 <xsl:import href="docbook.xsl"/>
17
18 <xsl:param name="show.revisionflag" select="'1'"/>
19
20 <xsl:template name="system.head.content">
21 <xsl:param name="node" select="."/>
22
23 <style type="text/css">
24 <xsl:text>
25 div.added { background-color: #ffff99;
26 text-decoration: underline; }
27 div.deleted { text-decoration: line-through;
28 background-color: #FF7F7F; }
29 div.changed { background-color: #99ff99; }
30 div.off { }
31
32 span.added { background-color: #ffff99;
33 text-decoration: underline; }
34 span.deleted { text-decoration: line-through;
35 background-color: #FF7F7F; }
36 span.changed { background-color: #99ff99; }
37 span.off { }
38 </xsl:text>
39 </style>
40 </xsl:template>
41
42 <xsl:template match="*[@revisionflag]">
43 <xsl:choose>
44 <xsl:when test="local-name(.) = 'para'
45 or local-name(.) = 'simpara'
46 or local-name(.) = 'formalpara'
47 or local-name(.) = 'section'
48 or local-name(.) = 'sect1'
49 or local-name(.) = 'sect2'
50 or local-name(.) = 'sect3'
51 or local-name(.) = 'sect4'
52 or local-name(.) = 'sect5'
53 or local-name(.) = 'chapter'
54 or local-name(.) = 'preface'
55 or local-name(.) = 'itemizedlist'
56 or local-name(.) = 'varlistentry'
57 or local-name(.) = 'glossary'
58 or local-name(.) = 'bibliography'
59 or local-name(.) = 'index'
60 or local-name(.) = 'appendix'">
61 <div class='{@revisionflag}'>
62 <xsl:apply-imports/>
63 </div>
64 </xsl:when>
65 <xsl:when test="local-name(.) = 'phrase'
66 or local-name(.) = 'ulink'
67 or local-name(.) = 'link'
68 or local-name(.) = 'filename'
69 or local-name(.) = 'literal'
70 or local-name(.) = 'member'
71 or local-name(.) = 'glossterm'
72 or local-name(.) = 'sgmltag'
73 or local-name(.) = 'quote'
74 or local-name(.) = 'emphasis'
75 or local-name(.) = 'command'
76 or local-name(.) = 'xref'">
77 <span class='{@revisionflag}'>
78 <xsl:apply-imports/>
79 </span>
80 </xsl:when>
81 <xsl:when test="local-name(.) = 'listitem'
82 or local-name(.) = 'entry'
83 or local-name(.) = 'title'">
84 <!-- nop; these are handled directly in the stylesheet -->
85 <xsl:apply-imports/>
86 </xsl:when>
87 <xsl:otherwise>
88 <xsl:message>
89 <xsl:text>Revisionflag on unexpected element: </xsl:text>
90 <xsl:value-of select="local-name(.)"/>
91 <xsl:text> (Assuming block)</xsl:text>
92 </xsl:message>
93 <div class='{@revisionflag}'>
94 <xsl:apply-imports/>
95 </div>
96 </xsl:otherwise>
97 </xsl:choose>
98 </xsl:template>
99
100 </xsl:stylesheet>