1 <?xml version="1.0" encoding="ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
6 <!-- ********************************************************************
7 $Id: block.xsl 8441 2009-05-24 02:14:56Z abdelazer $
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
17 <!-- What should we do about styling blockinfo? -->
19 <xsl:template match="blockinfo|info">
23 <!-- ==================================================================== -->
25 <xsl:template name="block.object">
27 <xsl:call-template name="common.html.attributes"/>
28 <xsl:call-template name="anchor"/>
29 <xsl:apply-templates/>
33 <!-- ==================================================================== -->
35 <xsl:template match="para">
36 <xsl:call-template name="paragraph">
37 <xsl:with-param name="class">
38 <xsl:if test="@role and $para.propagates.style != 0">
39 <xsl:value-of select="@role"/>
42 <xsl:with-param name="content">
43 <xsl:if test="position() = 1 and parent::listitem">
44 <xsl:call-template name="anchor">
45 <xsl:with-param name="node" select="parent::listitem"/>
49 <xsl:call-template name="anchor"/>
50 <xsl:apply-templates/>
55 <xsl:template name="paragraph">
56 <xsl:param name="class" select="''"/>
57 <xsl:param name="content"/>
59 <xsl:variable name="p">
62 <xsl:when test="$class != ''">
63 <xsl:call-template name="common.html.attributes">
64 <xsl:with-param name="class" select="$class"/>
68 <xsl:call-template name="locale.html.attributes"/>
71 <xsl:copy-of select="$content"/>
76 <xsl:when test="$html.cleanup != 0">
77 <xsl:call-template name="unwrap.p">
78 <xsl:with-param name="p" select="$p"/>
82 <xsl:copy-of select="$p"/>
87 <xsl:template match="simpara">
88 <!-- see also listitem/simpara in lists.xsl -->
90 <xsl:call-template name="locale.html.attributes"/>
91 <xsl:if test="@role and $para.propagates.style != 0">
92 <xsl:apply-templates select="." mode="class.attribute">
93 <xsl:with-param name="class" select="@role"/>
94 </xsl:apply-templates>
97 <xsl:call-template name="anchor"/>
98 <xsl:apply-templates/>
102 <xsl:template match="formalpara">
103 <xsl:call-template name="paragraph">
104 <xsl:with-param name="class">
105 <xsl:if test="@role and $para.propagates.style != 0">
106 <xsl:value-of select="@role"/>
109 <xsl:with-param name="content">
110 <xsl:call-template name="anchor"/>
111 <xsl:apply-templates/>
116 <!-- Only use title from info -->
117 <xsl:template match="formalpara/info">
118 <xsl:apply-templates select="title"/>
121 <xsl:template match="formalpara/title|formalpara/info/title">
122 <xsl:variable name="titleStr">
123 <xsl:apply-templates/>
125 <xsl:variable name="lastChar">
126 <xsl:if test="$titleStr != ''">
127 <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
132 <xsl:copy-of select="$titleStr"/>
133 <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))">
134 <xsl:value-of select="$runinhead.default.title.end.punct"/>
136 <xsl:text> </xsl:text>
140 <xsl:template match="formalpara/para">
141 <xsl:apply-templates/>
144 <!-- ==================================================================== -->
146 <xsl:template match="blockquote">
148 <xsl:call-template name="common.html.attributes"/>
149 <xsl:call-template name="anchor"/>
152 <xsl:when test="attribution">
153 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote">
155 <td valign="top"> </td>
157 <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
159 <td valign="top"> </td>
162 <td valign="top"> </td>
163 <td colspan="2" align="{$direction.align.end}" valign="top">
164 <xsl:text>--</xsl:text>
165 <xsl:apply-templates select="attribution"/>
172 <xsl:call-template name="common.html.attributes"/>
173 <xsl:apply-templates/>
180 <xsl:template match="blockquote/title|blockquote/info/title">
181 <div class="blockquote-title">
184 <xsl:apply-templates/>
190 <!-- Use an em dash per Chicago Manual of Style and https://sourceforge.net/tracker/index.php?func=detail&aid=2793878&group_id=21935&atid=373747 -->
191 <xsl:template match="epigraph">
193 <xsl:call-template name="common.html.attributes"/>
194 <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
195 <xsl:if test="attribution">
196 <div class="attribution">
197 <span>—<xsl:apply-templates select="attribution"/></span>
203 <xsl:template match="attribution">
205 <xsl:call-template name="common.html.attributes"/>
206 <xsl:apply-templates/>
210 <!-- ==================================================================== -->
212 <xsl:template match="abstract|sidebar">
214 <xsl:call-template name="common.html.attributes"/>
215 <xsl:call-template name="anchor"/>
216 <xsl:call-template name="formal.object.heading">
217 <xsl:with-param name="title">
218 <xsl:apply-templates select="." mode="title.markup">
219 <xsl:with-param name="allow-anchors" select="'1'"/>
220 </xsl:apply-templates>
223 <xsl:apply-templates/>
227 <xsl:template match="abstract/title|sidebar/title">
230 <xsl:template match="sidebar/sidebarinfo|sidebar/info"/>
232 <!-- ==================================================================== -->
234 <xsl:template match="msgset">
235 <xsl:apply-templates/>
238 <xsl:template match="msgentry">
239 <xsl:call-template name="block.object"/>
242 <xsl:template match="simplemsgentry">
243 <xsl:call-template name="block.object"/>
246 <xsl:template match="msg">
247 <xsl:call-template name="block.object"/>
250 <xsl:template match="msgmain">
251 <xsl:apply-templates/>
254 <xsl:template match="msgmain/title">
255 <b><xsl:apply-templates/></b>
258 <xsl:template match="msgsub">
259 <xsl:apply-templates/>
262 <xsl:template match="msgsub/title">
263 <b><xsl:apply-templates/></b>
266 <xsl:template match="msgrel">
267 <xsl:apply-templates/>
270 <xsl:template match="msgrel/title">
271 <b><xsl:apply-templates/></b>
274 <xsl:template match="msgtext">
275 <xsl:apply-templates/>
278 <xsl:template match="msginfo">
279 <xsl:call-template name="block.object"/>
282 <xsl:template match="msglevel">
285 <xsl:call-template name="gentext.template">
286 <xsl:with-param name="context" select="'msgset'"/>
287 <xsl:with-param name="name" select="'MsgLevel'"/>
290 <xsl:apply-templates/>
294 <xsl:template match="msgorig">
297 <xsl:call-template name="gentext.template">
298 <xsl:with-param name="context" select="'msgset'"/>
299 <xsl:with-param name="name" select="'MsgOrig'"/>
302 <xsl:apply-templates/>
306 <xsl:template match="msgaud">
309 <xsl:call-template name="gentext.template">
310 <xsl:with-param name="context" select="'msgset'"/>
311 <xsl:with-param name="name" select="'MsgAud'"/>
314 <xsl:apply-templates/>
318 <xsl:template match="msgexplan">
319 <xsl:call-template name="block.object"/>
322 <xsl:template match="msgexplan/title">
323 <p><b><xsl:apply-templates/></b></p>
326 <!-- ==================================================================== -->
328 <xsl:template match="revhistory">
330 <xsl:call-template name="common.html.attributes"/>
331 <table border="0" width="100%" summary="Revision history">
333 <th align="{$direction.align.start}" valign="top" colspan="3">
335 <xsl:call-template name="gentext">
336 <xsl:with-param name="key" select="'RevHistory'"/>
341 <xsl:apply-templates/>
346 <xsl:template match="revhistory/revision">
347 <xsl:variable name="revnumber" select="revnumber"/>
348 <xsl:variable name="revdate" select="date"/>
349 <xsl:variable name="revauthor" select="authorinitials|author"/>
350 <xsl:variable name="revremark" select="revremark|revdescription"/>
352 <td align="{$direction.align.start}">
353 <xsl:if test="$revnumber">
354 <xsl:call-template name="gentext">
355 <xsl:with-param name="key" select="'Revision'"/>
357 <xsl:call-template name="gentext.space"/>
358 <xsl:apply-templates select="$revnumber"/>
361 <td align="{$direction.align.start}">
362 <xsl:apply-templates select="$revdate"/>
365 <xsl:when test="count($revauthor)=0">
366 <td align="{$direction.align.start}">
367 <xsl:call-template name="dingbat">
368 <xsl:with-param name="dingbat">nbsp</xsl:with-param>
373 <td align="{$direction.align.start}">
374 <xsl:for-each select="$revauthor">
375 <xsl:apply-templates select="."/>
376 <xsl:if test="position() != last()">
377 <xsl:text>, </xsl:text>
384 <xsl:if test="$revremark">
386 <td align="{$direction.align.start}" colspan="3">
387 <xsl:apply-templates select="$revremark"/>
393 <xsl:template match="revision/revnumber">
394 <xsl:apply-templates/>
397 <xsl:template match="revision/date">
398 <xsl:apply-templates/>
401 <xsl:template match="revision/authorinitials">
402 <xsl:text>, </xsl:text>
403 <xsl:apply-templates/>
406 <xsl:template match="revision/authorinitials[1]" priority="2">
407 <xsl:apply-templates/>
410 <xsl:template match="revision/revremark">
411 <xsl:apply-templates/>
414 <xsl:template match="revision/revdescription">
415 <xsl:apply-templates/>
418 <!-- ==================================================================== -->
420 <xsl:template match="ackno|acknowledgements[parent::article]">
422 <xsl:call-template name="common.html.attributes"/>
423 <xsl:apply-templates/>
427 <!-- ==================================================================== -->
429 <xsl:template match="highlights">
430 <xsl:call-template name="block.object"/>
433 <!-- ==================================================================== -->