]> git.evergreen-ils.org Git - working/Evergreen.git/blob - stylesheets/evergreen_docbook_files/docbook-xsl-1.75.2/html/changebars.xsl
Add stylesheets for our evergreen docbook site.
[working/Evergreen.git] / stylesheets / evergreen_docbook_files / docbook-xsl-1.75.2 / html / changebars.xsl
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 8128 2008-09-29 17:16:10Z mzjn $
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:call-template name="block.or.inline.revision"/>
44 </xsl:template>
45
46 <xsl:template name="block.or.inline.revision">
47   <xsl:param name="revisionflag" select="@revisionflag"/>
48   
49   <xsl:choose>
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}'>
78         <xsl:apply-imports/>
79       </div>
80     </xsl:when>
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}'>
99         <xsl:apply-imports/>
100       </span>
101     </xsl:when>
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 -->
106       <xsl:apply-imports/>
107     </xsl:when>
108     <xsl:otherwise>
109       <xsl:message>
110         <xsl:text>Revisionflag on unexpected element: </xsl:text>
111         <xsl:value-of select="local-name(.)"/>
112         <xsl:text> (Assuming block)</xsl:text>
113       </xsl:message>
114       <div class='{$revisionflag}'>
115         <xsl:apply-imports/>
116       </div>
117     </xsl:otherwise>
118   </xsl:choose>
119 </xsl:template>
120
121 </xsl:stylesheet>