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$ 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 17<xsl:template name="block.object"> 18 <div class="{name(.)}"> 19 <a> 20 <xsl:attribute name="name"> 21 <xsl:call-template name="object.id"/> 22 </xsl:attribute> 23 </a> 24 <xsl:apply-templates/> 25 </div> 26</xsl:template> 27 28<!-- ==================================================================== --> 29 30<xsl:template match="para"> 31 <p> 32 <xsl:if test="position() = 1 and parent::listitem"> 33 <a> 34 <xsl:attribute name="name"> 35 <xsl:call-template name="object.id"> 36 <xsl:with-param name="object" select="parent::listitem"/> 37 </xsl:call-template> 38 </xsl:attribute> 39 </a> 40 </xsl:if> 41 42 <xsl:if test="@id"> 43 <a name="{@id}"/> 44 </xsl:if> 45 <xsl:apply-templates/> 46 </p> 47</xsl:template> 48 49<xsl:template match="simpara"> 50 <p> 51 <xsl:if test="@id"> 52 <a name="{@id}"/> 53 </xsl:if> 54 <xsl:apply-templates/> 55 </p> 56</xsl:template> 57 58<xsl:template match="formalpara"> 59 <p> 60 <xsl:if test="@id"> 61 <a name="{@id}"/> 62 </xsl:if> 63 <xsl:apply-templates/> 64 </p> 65</xsl:template> 66 67<xsl:template match="formalpara/title"> 68 <b><xsl:apply-templates/></b> 69 <xsl:call-template name="gentext.space"/> 70</xsl:template> 71 72<xsl:template match="formalpara/para"> 73 <xsl:apply-templates/> 74</xsl:template> 75 76<!-- ==================================================================== --> 77 78<xsl:template match="blockquote"> 79 <xsl:if test="@id"> 80 <a name="{@id}"/> 81 </xsl:if> 82 <xsl:choose> 83 <xsl:when test="attribution"> 84 <table border="0" width="100%" 85 cellspacing="0" cellpadding="0" class="blockquote" 86 summary="Block quote"> 87 <tr> 88 <td width="10%" valign="top"> </td> 89 <td width="80%" valign="top"> 90 <xsl:apply-templates 91 select="child::*[local-name(.)!='attribution']"/> 92 </td> 93 <td width="10%" valign="top"> </td> 94 </tr> 95 <tr> 96 <td colspan="2" align="right" valign="top"> 97 <xsl:text>--</xsl:text> 98 <xsl:apply-templates select="attribution"/> 99 </td> 100 <td width="10%" valign="top"> </td> 101 </tr> 102 </table> 103 </xsl:when> 104 <xsl:otherwise> 105 <blockquote class="blockquote"> 106 <xsl:apply-templates/> 107 </blockquote> 108 </xsl:otherwise> 109 </xsl:choose> 110</xsl:template> 111 112<xsl:template match="epigraph"> 113 <div class="{name(.)}"> 114 <xsl:apply-templates select="para"/> 115 <span>--<xsl:apply-templates select="attribution"/></span> 116 </div> 117</xsl:template> 118 119<xsl:template match="attribution"> 120 <span class="{name(.)}"><xsl:apply-templates/></span> 121</xsl:template> 122 123<!-- ==================================================================== --> 124 125<xsl:template match="sidebar"> 126 <div class="{name(.)}"> 127 <a> 128 <xsl:attribute name="name"> 129 <xsl:call-template name="object.id"/> 130 </xsl:attribute> 131 </a> 132 133 <xsl:apply-templates/> 134 </div> 135</xsl:template> 136 137<xsl:template match="sidebar/title"> 138 <p class="title"> 139 <b><xsl:apply-templates/></b> 140 </p> 141</xsl:template> 142 143<!-- ==================================================================== --> 144 145<xsl:template match="abstract"> 146 <div class="{name(.)}"> 147 <xsl:call-template name="formal.object.heading"> 148 <xsl:with-param name="title"> 149 <xsl:apply-templates select="." mode="title.markup"> 150 <xsl:with-param name="allow-anchors" select="'1'"/> 151 </xsl:apply-templates> 152 </xsl:with-param> 153 </xsl:call-template> 154 <xsl:apply-templates/> 155 </div> 156</xsl:template> 157 158<xsl:template match="abstract/title"> 159</xsl:template> 160 161<!-- ==================================================================== --> 162 163<xsl:template match="msgset"> 164 <xsl:apply-templates/> 165</xsl:template> 166 167<xsl:template match="msgentry"> 168 <xsl:call-template name="block.object"/> 169</xsl:template> 170 171<xsl:template match="simplemsgentry"> 172 <xsl:call-template name="block.object"/> 173</xsl:template> 174 175<xsl:template match="msg"> 176 <xsl:call-template name="block.object"/> 177</xsl:template> 178 179<xsl:template match="msgmain"> 180 <xsl:apply-templates/> 181</xsl:template> 182 183<xsl:template match="msgmain/title"> 184 <b><xsl:apply-templates/></b> 185</xsl:template> 186 187<xsl:template match="msgsub"> 188 <xsl:apply-templates/> 189</xsl:template> 190 191<xsl:template match="msgsub/title"> 192 <b><xsl:apply-templates/></b> 193</xsl:template> 194 195<xsl:template match="msgrel"> 196 <xsl:apply-templates/> 197</xsl:template> 198 199<xsl:template match="msgrel/title"> 200 <b><xsl:apply-templates/></b> 201</xsl:template> 202 203<xsl:template match="msgtext"> 204 <xsl:apply-templates/> 205</xsl:template> 206 207<xsl:template match="msginfo"> 208 <xsl:call-template name="block.object"/> 209</xsl:template> 210 211<xsl:template match="msglevel"> 212 <p> 213 <b> 214 <xsl:call-template name="gentext.template"> 215 <xsl:with-param name="context" select="'msgset'"/> 216 <xsl:with-param name="name" select="'MsgLevel'"/> 217 </xsl:call-template> 218 </b> 219 <xsl:apply-templates/> 220 </p> 221</xsl:template> 222 223<xsl:template match="msgorig"> 224 <p> 225 <b> 226 <xsl:call-template name="gentext.template"> 227 <xsl:with-param name="context" select="'msgset'"/> 228 <xsl:with-param name="name" select="'MsgOrig'"/> 229 </xsl:call-template> 230 </b> 231 <xsl:apply-templates/> 232 </p> 233</xsl:template> 234 235<xsl:template match="msgaud"> 236 <p> 237 <b> 238 <xsl:call-template name="gentext.template"> 239 <xsl:with-param name="context" select="'msgset'"/> 240 <xsl:with-param name="name" select="'MsgAud'"/> 241 </xsl:call-template> 242 </b> 243 <xsl:apply-templates/> 244 </p> 245</xsl:template> 246 247<xsl:template match="msgexplan"> 248 <xsl:call-template name="block.object"/> 249</xsl:template> 250 251<xsl:template match="msgexplan/title"> 252 <p><b><xsl:apply-templates/></b></p> 253</xsl:template> 254 255<!-- ==================================================================== --> 256 257<xsl:template match="revhistory"> 258 <div class="{name(.)}"> 259 <table border="0" width="100%" summary="Revision history"> 260 <tr> 261 <th align="left" valign="top" colspan="3"> 262 <b> 263 <xsl:call-template name="gentext"> 264 <xsl:with-param name="key" select="'RevHistory'"/> 265 </xsl:call-template> 266 </b> 267 </th> 268 </tr> 269 <xsl:apply-templates/> 270 </table> 271 </div> 272</xsl:template> 273 274<xsl:template match="revhistory/revision"> 275 <xsl:variable name="revnumber" select=".//revnumber"/> 276 <xsl:variable name="revdate" select=".//date"/> 277 <xsl:variable name="revauthor" select=".//authorinitials"/> 278 <xsl:variable name="revremark" select=".//revremark|/revdescription"/> 279 <tr> 280 <td align="left"> 281 <xsl:if test="$revnumber"> 282 <xsl:call-template name="gentext"> 283 <xsl:with-param name="key" select="'Revision'"/> 284 </xsl:call-template> 285 <xsl:call-template name="gentext.space"/> 286 <xsl:apply-templates select="$revnumber"/> 287 </xsl:if> 288 </td> 289 <td align="left"> 290 <xsl:apply-templates select="$revdate"/> 291 </td> 292 <xsl:choose> 293 <xsl:when test="count($revauthor)=0"> 294 <td align="left"> 295 <xsl:call-template name="dingbat"> 296 <xsl:with-param name="dingbat">nbsp</xsl:with-param> 297 </xsl:call-template> 298 </td> 299 </xsl:when> 300 <xsl:otherwise> 301 <td align="left"> 302 <xsl:apply-templates select="$revauthor"/> 303 </td> 304 </xsl:otherwise> 305 </xsl:choose> 306 </tr> 307 <xsl:if test="$revremark"> 308 <tr> 309 <td align="left" colspan="3"> 310 <xsl:apply-templates select="$revremark"/> 311 </td> 312 </tr> 313 </xsl:if> 314</xsl:template> 315 316<xsl:template match="revision/revnumber"> 317 <xsl:apply-templates/> 318</xsl:template> 319 320<xsl:template match="revision/date"> 321 <xsl:apply-templates/> 322</xsl:template> 323 324<xsl:template match="revision/authorinitials"> 325 <xsl:text>, </xsl:text> 326 <xsl:apply-templates/> 327</xsl:template> 328 329<xsl:template match="revision/authorinitials[1]" priority="2"> 330 <xsl:apply-templates/> 331</xsl:template> 332 333<xsl:template match="revision/revremark"> 334 <xsl:apply-templates/> 335</xsl:template> 336 337<xsl:template match="revision/revdescription"> 338 <xsl:apply-templates/> 339</xsl:template> 340 341<!-- ==================================================================== --> 342 343<xsl:template match="ackno"> 344 <p class="{name(.)}"> 345 <xsl:apply-templates/> 346 </p> 347</xsl:template> 348 349<!-- ==================================================================== --> 350 351<xsl:template match="highlights"> 352 <xsl:call-template name="block.object"/> 353</xsl:template> 354 355<!-- ==================================================================== --> 356 357</xsl:stylesheet> 358