2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <!-- ********************************************************************
6 $Id: changebars.xsl 8128 2008-09-29 17:16:10Z mzjn $
7 ********************************************************************
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.
13 ******************************************************************** -->
15 <!-- ==================================================================== -->
16 <xsl:import href="docbook.xsl"/>
18 <xsl:param name="show.revisionflag" select="'1'"/>
20 <xsl:template name="system.head.content">
21 <xsl:param name="node" select="."/>
23 <style type="text/css">
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; }
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; }
42 <xsl:template match="*[@revisionflag]">
43 <xsl:call-template name="block.or.inline.revision"/>
46 <xsl:template name="block.or.inline.revision">
47 <xsl:param name="revisionflag" select="@revisionflag"/>
50 <xsl:when test="local-name(.) = 'para'
51 or local-name(.) = 'formalpara'
52 or local-name(.) = 'simpara'
53 or local-name(.) = 'simplesect'
54 or local-name(.) = 'section'
55 or local-name(.) = 'sect1'
56 or local-name(.) = 'sect2'
57 or local-name(.) = 'sect3'
58 or local-name(.) = 'sect4'
59 or local-name(.) = 'sect5'
60 or local-name(.) = 'chapter'
61 or local-name(.) = 'preface'
62 or local-name(.) = 'itemizedlist'
63 or local-name(.) = 'orderedlist'
64 or local-name(.) = 'variablelist'
65 or local-name(.) = 'varlistentry'
66 or local-name(.) = 'informaltable'
67 or local-name(.) = 'informalexample'
68 or local-name(.) = 'note'
69 or local-name(.) = 'example'
70 or local-name(.) = 'mediaobject'
71 or local-name(.) = 'sidebar'
72 or local-name(.) = 'glossary'
73 or local-name(.) = 'glossentry'
74 or local-name(.) = 'bibliography'
75 or local-name(.) = 'index'
76 or local-name(.) = 'appendix'">
77 <div class='{$revisionflag}'>
81 <xsl:when test="local-name(.) = 'phrase'
82 or local-name(.) = 'ulink'
83 or local-name(.) = 'link'
84 or local-name(.) = 'olink'
85 or local-name(.) = 'inlinemediaobject'
86 or local-name(.) = 'filename'
87 or local-name(.) = 'literal'
88 or local-name(.) = 'member'
89 or local-name(.) = 'term'
90 or local-name(.) = 'guilabel'
91 or local-name(.) = 'glossterm'
92 or local-name(.) = 'sgmltag'
93 or local-name(.) = 'tag'
94 or local-name(.) = 'quote'
95 or local-name(.) = 'emphasis'
96 or local-name(.) = 'command'
97 or local-name(.) = 'xref'">
98 <span class='{$revisionflag}'>
102 <xsl:when test="local-name(.) = 'listitem'
103 or local-name(.) = 'entry'
104 or local-name(.) = 'title'">
105 <!-- nop; these are handled directly in the stylesheet -->
110 <xsl:text>Revisionflag on unexpected element: </xsl:text>
111 <xsl:value-of select="local-name(.)"/>
112 <xsl:text> (Assuming block)</xsl:text>
114 <div class='{$revisionflag}'>