| 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,v 1.12 2005/02/01 07:33:38 bobstayton Exp $
 | 
|---|
| 7 |      ********************************************************************
 | 
|---|
| 8 | 
 | 
|---|
| 9 |      This file is part of the XSL DocBook Stylesheet distribution.
 | 
|---|
| 10 |      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
 | 
|---|
| 11 |      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 | div.deleted  { text-decoration: line-through;
 | 
|---|
| 27 |                background-color: #FF7F7F; }
 | 
|---|
| 28 | div.changed  { background-color: #99ff99; }
 | 
|---|
| 29 | div.off      {  }
 | 
|---|
| 30 | 
 | 
|---|
| 31 | span.added   { background-color: #ffff99; }
 | 
|---|
| 32 | span.deleted { text-decoration: line-through;
 | 
|---|
| 33 |                background-color: #FF7F7F; }
 | 
|---|
| 34 | span.changed { background-color: #99ff99; }
 | 
|---|
| 35 | span.off     {  }
 | 
|---|
| 36 | </xsl:text>
 | 
|---|
| 37 | </style>
 | 
|---|
| 38 | </xsl:template>
 | 
|---|
| 39 | 
 | 
|---|
| 40 | <xsl:template match="*[@revisionflag]">
 | 
|---|
| 41 |   <xsl:choose>
 | 
|---|
| 42 |     <xsl:when test="local-name(.) = 'para'
 | 
|---|
| 43 |                     or local-name(.) = 'simpara'
 | 
|---|
| 44 |                     or local-name(.) = 'formalpara'
 | 
|---|
| 45 |                     or local-name(.) = 'section'
 | 
|---|
| 46 |                     or local-name(.) = 'sect1'
 | 
|---|
| 47 |                     or local-name(.) = 'sect2'
 | 
|---|
| 48 |                     or local-name(.) = 'sect3'
 | 
|---|
| 49 |                     or local-name(.) = 'sect4'
 | 
|---|
| 50 |                     or local-name(.) = 'sect5'
 | 
|---|
| 51 |                     or local-name(.) = 'chapter'
 | 
|---|
| 52 |                     or local-name(.) = 'preface'
 | 
|---|
| 53 |                     or local-name(.) = 'itemizedlist'
 | 
|---|
| 54 |                     or local-name(.) = 'varlistentry'
 | 
|---|
| 55 |                     or local-name(.) = 'glossary'
 | 
|---|
| 56 |                     or local-name(.) = 'bibliography'
 | 
|---|
| 57 |                     or local-name(.) = 'index'
 | 
|---|
| 58 |                     or local-name(.) = 'appendix'">
 | 
|---|
| 59 |       <div class='{@revisionflag}'>
 | 
|---|
| 60 |         <xsl:apply-imports/>
 | 
|---|
| 61 |       </div>
 | 
|---|
| 62 |     </xsl:when>
 | 
|---|
| 63 |     <xsl:when test="local-name(.) = 'phrase'
 | 
|---|
| 64 |                     or local-name(.) = 'ulink'
 | 
|---|
| 65 |                     or local-name(.) = 'link'
 | 
|---|
| 66 |                     or local-name(.) = 'filename'
 | 
|---|
| 67 |                     or local-name(.) = 'literal'
 | 
|---|
| 68 |                     or local-name(.) = 'member'
 | 
|---|
| 69 |                     or local-name(.) = 'glossterm'
 | 
|---|
| 70 |                     or local-name(.) = 'sgmltag'
 | 
|---|
| 71 |                     or local-name(.) = 'quote'
 | 
|---|
| 72 |                     or local-name(.) = 'emphasis'
 | 
|---|
| 73 |                     or local-name(.) = 'command'
 | 
|---|
| 74 |                     or local-name(.) = 'xref'">
 | 
|---|
| 75 |       <span class='{@revisionflag}'>
 | 
|---|
| 76 |         <xsl:apply-imports/>
 | 
|---|
| 77 |       </span>
 | 
|---|
| 78 |     </xsl:when>
 | 
|---|
| 79 |     <xsl:when test="local-name(.) = 'listitem'
 | 
|---|
| 80 |                     or local-name(.) = 'entry'
 | 
|---|
| 81 |                     or local-name(.) = 'title'">
 | 
|---|
| 82 |       <!-- nop; these are handled directly in the stylesheet -->
 | 
|---|
| 83 |       <xsl:apply-imports/>
 | 
|---|
| 84 |     </xsl:when>
 | 
|---|
| 85 |     <xsl:otherwise>
 | 
|---|
| 86 |       <xsl:message>
 | 
|---|
| 87 |         <xsl:text>Revisionflag on unexpected element: </xsl:text>
 | 
|---|
| 88 |         <xsl:value-of select="local-name(.)"/>
 | 
|---|
| 89 |         <xsl:text> (Assuming block)</xsl:text>
 | 
|---|
| 90 |       </xsl:message>
 | 
|---|
| 91 |       <div class='{@revisionflag}'>
 | 
|---|
| 92 |         <xsl:apply-imports/>
 | 
|---|
| 93 |       </div>
 | 
|---|
| 94 |     </xsl:otherwise>
 | 
|---|
| 95 |   </xsl:choose>
 | 
|---|
| 96 | </xsl:template>
 | 
|---|
| 97 | 
 | 
|---|
| 98 | </xsl:stylesheet>
 | 
|---|