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 9997 2015-10-15 17:44:09Z bobstayton $
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="id.attribute"/>
29 <xsl:call-template name="anchor"/>
30 <xsl:apply-templates/>
34 <!-- ==================================================================== -->
36 <xsl:template match="para">
37 <xsl:call-template name="paragraph">
38 <xsl:with-param name="class">
39 <xsl:if test="@role and $para.propagates.style != 0">
40 <xsl:value-of select="@role"/>
43 <xsl:with-param name="content">
44 <xsl:if test="position() = 1 and parent::listitem">
45 <xsl:call-template name="anchor">
46 <xsl:with-param name="node" select="parent::listitem"/>
50 <xsl:call-template name="anchor"/>
51 <xsl:apply-templates/>
56 <xsl:template name="paragraph">
57 <xsl:param name="class" select="''"/>
58 <xsl:param name="content"/>
60 <xsl:variable name="p">
62 <xsl:call-template name="id.attribute"/>
64 <xsl:when test="$class != ''">
65 <xsl:call-template name="common.html.attributes">
66 <xsl:with-param name="class" select="$class"/>
70 <xsl:call-template name="common.html.attributes">
71 <xsl:with-param name="class" select="''"/>
76 <xsl:copy-of select="$content"/>
81 <xsl:when test="$html.cleanup != 0">
82 <xsl:call-template name="unwrap.p">
83 <xsl:with-param name="p" select="$p"/>
87 <xsl:copy-of select="$p"/>
92 <xsl:template match="simpara">
93 <!-- see also listitem/simpara in lists.xsl -->
95 <xsl:call-template name="id.attribute"/>
96 <xsl:call-template name="locale.html.attributes"/>
97 <xsl:if test="@role and $para.propagates.style != 0">
98 <xsl:apply-templates select="." mode="class.attribute">
99 <xsl:with-param name="class" select="@role"/>
100 </xsl:apply-templates>
103 <xsl:call-template name="anchor"/>
104 <xsl:apply-templates/>
108 <xsl:template match="formalpara">
109 <xsl:call-template name="paragraph">
110 <xsl:with-param name="class">
111 <xsl:if test="@role and $para.propagates.style != 0">
112 <xsl:value-of select="@role"/>
115 <xsl:with-param name="content">
116 <xsl:call-template name="anchor"/>
117 <xsl:apply-templates/>
122 <!-- Only use title from info -->
123 <xsl:template match="formalpara/info">
124 <xsl:apply-templates select="title"/>
127 <xsl:template match="formalpara/title|formalpara/info/title">
128 <xsl:variable name="titleStr">
129 <xsl:apply-templates/>
131 <xsl:variable name="lastChar">
132 <xsl:if test="$titleStr != ''">
133 <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
138 <xsl:when test="$make.clean.html != 0">
139 <span class="formalpara-title">
140 <xsl:copy-of select="$titleStr"/>
141 <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))">
142 <xsl:value-of select="$runinhead.default.title.end.punct"/>
144 <xsl:text> </xsl:text>
148 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
149 <xsl:copy-of select="$titleStr"/>
150 <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))">
151 <xsl:value-of select="$runinhead.default.title.end.punct"/>
153 <xsl:text> </xsl:text>
159 <xsl:template match="formalpara/para">
160 <xsl:apply-templates/>
163 <!-- ==================================================================== -->
165 <xsl:template match="blockquote">
167 <xsl:call-template name="common.html.attributes"/>
168 <xsl:call-template name="id.attribute"/>
169 <xsl:call-template name="anchor"/>
172 <xsl:when test="attribution">
173 <table border="{$table.border.off}" class="blockquote">
174 <xsl:if test="$css.decoration != 0">
175 <xsl:attribute name="style">
176 <xsl:text>width: 100%; cellspacing: 0; cellpadding: 0;</xsl:text>
179 <xsl:if test="$div.element != 'section'">
180 <xsl:attribute name="summary">Block quote</xsl:attribute>
183 <td width="10%" valign="top"> </td>
184 <td width="80%" valign="top">
185 <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
187 <td width="10%" valign="top"> </td>
190 <td width="10%" valign="top"> </td>
191 <td colspan="2" align="{$direction.align.end}" valign="top">
192 <xsl:text>--</xsl:text>
193 <xsl:apply-templates select="attribution"/>
200 <xsl:call-template name="common.html.attributes"/>
201 <xsl:apply-templates/>
208 <xsl:template match="blockquote/title|blockquote/info/title">
210 <xsl:when test="$make.clean.html != 0">
211 <div class="blockquote-title">
212 <xsl:apply-templates/>
216 <div class="blockquote-title">
218 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
219 <xsl:apply-templates/>
227 <!-- 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 -->
228 <xsl:template match="epigraph">
230 <xsl:call-template name="common.html.attributes"/>
231 <xsl:call-template name="id.attribute"/>
232 <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
233 <xsl:if test="attribution">
234 <div class="attribution">
235 <span>—<xsl:apply-templates select="attribution"/></span>
241 <xsl:template match="attribution">
243 <xsl:call-template name="common.html.attributes"/>
244 <xsl:call-template name="id.attribute"/>
245 <xsl:apply-templates/>
249 <!-- ==================================================================== -->
251 <xsl:template match="sidebar">
253 <xsl:call-template name="common.html.attributes"/>
254 <xsl:call-template name="id.attribute"/>
255 <xsl:call-template name="anchor"/>
256 <xsl:call-template name="sidebar.titlepage"/>
257 <xsl:apply-templates/>
261 <xsl:template match="abstract/title|sidebar/title">
264 <xsl:template match="sidebar/sidebarinfo|sidebar/info"/>
266 <xsl:template match="abstract">
268 <xsl:call-template name="common.html.attributes"/>
269 <xsl:call-template name="anchor"/>
270 <xsl:call-template name="formal.object.heading">
271 <xsl:with-param name="title">
272 <xsl:apply-templates select="." mode="title.markup">
273 <xsl:with-param name="allow-anchors" select="'1'"/>
274 </xsl:apply-templates>
277 <xsl:apply-templates/>
281 <!-- ==================================================================== -->
283 <xsl:template match="msgset">
284 <xsl:apply-templates/>
287 <xsl:template match="msgentry">
288 <xsl:call-template name="block.object"/>
291 <xsl:template match="simplemsgentry">
292 <xsl:call-template name="block.object"/>
295 <xsl:template match="msg">
296 <xsl:call-template name="block.object"/>
299 <xsl:template match="msgmain">
300 <xsl:apply-templates/>
303 <xsl:template match="msgmain/title">
305 <xsl:when test="$make.clean.html != 0">
306 <span class="msgmain-title">
307 <xsl:apply-templates/>
311 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
316 <xsl:template match="msgsub">
317 <xsl:apply-templates/>
320 <xsl:template match="msgsub/title">
322 <xsl:when test="$make.clean.html != 0">
323 <span class="msgsub-title">
324 <xsl:apply-templates/>
328 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
333 <xsl:template match="msgrel">
334 <xsl:apply-templates/>
337 <xsl:template match="msgrel/title">
339 <xsl:when test="$make.clean.html != 0">
340 <span class="msgrel-title">
341 <xsl:apply-templates/>
345 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
350 <xsl:template match="msgtext">
351 <xsl:apply-templates/>
354 <xsl:template match="msginfo">
355 <xsl:call-template name="block.object"/>
358 <xsl:template match="msglevel">
360 <xsl:when test="$make.clean.html != 0">
361 <div class="msglevel">
362 <span class="msglevel-title">
363 <xsl:call-template name="gentext.template">
364 <xsl:with-param name="context" select="'msgset'"/>
365 <xsl:with-param name="name" select="'MsgLevel'"/>
368 <xsl:apply-templates/>
373 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
374 <xsl:call-template name="gentext.template">
375 <xsl:with-param name="context" select="'msgset'"/>
376 <xsl:with-param name="name" select="'MsgLevel'"/>
379 <xsl:apply-templates/>
385 <xsl:template match="msgorig">
387 <xsl:when test="$make.clean.html != 0">
388 <div class="msgorig">
389 <span class="msgorig-title">
390 <xsl:call-template name="gentext.template">
391 <xsl:with-param name="context" select="'msgset'"/>
392 <xsl:with-param name="name" select="'MsgOrig'"/>
395 <xsl:apply-templates/>
400 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
401 <xsl:call-template name="gentext.template">
402 <xsl:with-param name="context" select="'msgset'"/>
403 <xsl:with-param name="name" select="'MsgOrig'"/>
406 <xsl:apply-templates/>
412 <xsl:template match="msgaud">
414 <xsl:when test="$make.clean.html != 0">
416 <span class="msgaud-title">
417 <xsl:call-template name="gentext.template">
418 <xsl:with-param name="context" select="'msgset'"/>
419 <xsl:with-param name="name" select="'MsgAud'"/>
422 <xsl:apply-templates/>
427 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
428 <xsl:call-template name="gentext.template">
429 <xsl:with-param name="context" select="'msgset'"/>
430 <xsl:with-param name="name" select="'MsgAud'"/>
433 <xsl:apply-templates/>
439 <xsl:template match="msgexplan">
440 <xsl:call-template name="block.object"/>
443 <xsl:template match="msgexplan/title">
445 <xsl:when test="$make.clean.html != 0">
446 <div class="msgexplan">
447 <span class="msgexplan-title">
448 <xsl:apply-templates/>
454 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
455 <xsl:apply-templates/>
462 <!-- ==================================================================== -->
464 <xsl:template match="revhistory">
466 <xsl:call-template name="common.html.attributes"/>
467 <xsl:call-template name="id.attribute"/>
469 <xsl:if test="$css.decoration != 0">
470 <xsl:attribute name="style">
471 <xsl:text>border-style:solid; width:100%;</xsl:text>
474 <!-- include summary attribute if not HTML5 -->
475 <xsl:if test="$div.element != 'section'">
476 <xsl:attribute name="summary">
477 <xsl:call-template name="gentext">
478 <xsl:with-param name="key">revhistory</xsl:with-param>
483 <th align="{$direction.align.start}" valign="top" colspan="3">
484 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
485 <xsl:call-template name="gentext">
486 <xsl:with-param name="key" select="'RevHistory'"/>
491 <xsl:apply-templates/>
496 <xsl:template match="revhistory/revision">
497 <xsl:variable name="revnumber" select="revnumber"/>
498 <xsl:variable name="revdate" select="date"/>
499 <xsl:variable name="revauthor" select="authorinitials|author"/>
500 <xsl:variable name="revremark" select="revremark|revdescription"/>
502 <td align="{$direction.align.start}">
503 <xsl:if test="$revnumber">
504 <xsl:call-template name="gentext">
505 <xsl:with-param name="key" select="'Revision'"/>
507 <xsl:call-template name="gentext.space"/>
508 <xsl:apply-templates select="$revnumber"/>
511 <td align="{$direction.align.start}">
512 <xsl:apply-templates select="$revdate"/>
515 <xsl:when test="count($revauthor)=0">
516 <td align="{$direction.align.start}">
517 <xsl:call-template name="dingbat">
518 <xsl:with-param name="dingbat">nbsp</xsl:with-param>
523 <td align="{$direction.align.start}">
524 <xsl:for-each select="$revauthor">
525 <xsl:apply-templates select="."/>
526 <xsl:if test="position() != last()">
527 <xsl:text>, </xsl:text>
534 <xsl:if test="$revremark">
536 <td align="{$direction.align.start}" colspan="3">
537 <xsl:apply-templates select="$revremark"/>
543 <xsl:template match="revision/revnumber">
544 <xsl:apply-templates/>
547 <xsl:template match="revision/date">
548 <xsl:apply-templates/>
551 <xsl:template match="revision/authorinitials">
552 <xsl:text>, </xsl:text>
553 <xsl:apply-templates/>
556 <xsl:template match="revision/authorinitials[1]" priority="2">
557 <xsl:apply-templates/>
560 <xsl:template match="revision/revremark">
561 <xsl:apply-templates/>
564 <xsl:template match="revision/revdescription">
565 <xsl:apply-templates/>
568 <!-- ==================================================================== -->
570 <xsl:template match="ackno|acknowledgements[parent::article]">
571 <xsl:call-template name="block.object"/>
574 <!-- ==================================================================== -->
576 <xsl:template match="highlights">
577 <xsl:call-template name="block.object"/>
580 <!-- ==================================================================== -->