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 8831 2010-08-13 17:08:49Z mzjn $
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:when test="$make.clean.html != 0">
133 <span class="formalpara-title">
134 <xsl:copy-of select="$titleStr"/>
135 <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))">
136 <xsl:value-of select="$runinhead.default.title.end.punct"/>
138 <xsl:text> </xsl:text>
142 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
143 <xsl:copy-of select="$titleStr"/>
144 <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))">
145 <xsl:value-of select="$runinhead.default.title.end.punct"/>
147 <xsl:text> </xsl:text>
153 <xsl:template match="formalpara/para">
154 <xsl:apply-templates/>
157 <!-- ==================================================================== -->
159 <xsl:template match="blockquote">
161 <xsl:call-template name="common.html.attributes"/>
162 <xsl:call-template name="anchor"/>
165 <xsl:when test="attribution">
166 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote">
168 <td width="10%" valign="top"> </td>
169 <td width="80%" valign="top">
170 <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
172 <td width="10%" valign="top"> </td>
175 <td width="10%" valign="top"> </td>
176 <td colspan="2" align="{$direction.align.end}" valign="top">
177 <xsl:text>--</xsl:text>
178 <xsl:apply-templates select="attribution"/>
185 <xsl:call-template name="common.html.attributes"/>
186 <xsl:apply-templates/>
193 <xsl:template match="blockquote/title|blockquote/info/title">
195 <xsl:when test="$make.clean.html != 0">
196 <div class="blockquote-title">
197 <xsl:apply-templates/>
201 <div class="blockquote-title">
203 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
204 <xsl:apply-templates/>
212 <!-- 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 -->
213 <xsl:template match="epigraph">
215 <xsl:call-template name="common.html.attributes"/>
216 <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
217 <xsl:if test="attribution">
218 <div class="attribution">
219 <span>—<xsl:apply-templates select="attribution"/></span>
225 <xsl:template match="attribution">
227 <xsl:call-template name="common.html.attributes"/>
228 <xsl:apply-templates/>
232 <!-- ==================================================================== -->
234 <xsl:template match="abstract|sidebar">
236 <xsl:call-template name="common.html.attributes"/>
237 <xsl:call-template name="anchor"/>
238 <xsl:call-template name="sidebar.titlepage"/>
239 <xsl:apply-templates/>
243 <xsl:template match="abstract/title|sidebar/title">
246 <xsl:template match="sidebar/sidebarinfo|sidebar/info"/>
248 <!-- ==================================================================== -->
250 <xsl:template match="msgset">
251 <xsl:apply-templates/>
254 <xsl:template match="msgentry">
255 <xsl:call-template name="block.object"/>
258 <xsl:template match="simplemsgentry">
259 <xsl:call-template name="block.object"/>
262 <xsl:template match="msg">
263 <xsl:call-template name="block.object"/>
266 <xsl:template match="msgmain">
267 <xsl:apply-templates/>
270 <xsl:template match="msgmain/title">
272 <xsl:when test="$make.clean.html != 0">
273 <span class="msgmain-title">
274 <xsl:apply-templates/>
278 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
283 <xsl:template match="msgsub">
284 <xsl:apply-templates/>
287 <xsl:template match="msgsub/title">
289 <xsl:when test="$make.clean.html != 0">
290 <span class="msgsub-title">
291 <xsl:apply-templates/>
295 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
300 <xsl:template match="msgrel">
301 <xsl:apply-templates/>
304 <xsl:template match="msgrel/title">
306 <xsl:when test="$make.clean.html != 0">
307 <span class="msgrel-title">
308 <xsl:apply-templates/>
312 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong>
317 <xsl:template match="msgtext">
318 <xsl:apply-templates/>
321 <xsl:template match="msginfo">
322 <xsl:call-template name="block.object"/>
325 <xsl:template match="msglevel">
327 <xsl:when test="$make.clean.html != 0">
328 <div class="msglevel">
329 <span class="msglevel-title">
330 <xsl:call-template name="gentext.template">
331 <xsl:with-param name="context" select="'msgset'"/>
332 <xsl:with-param name="name" select="'MsgLevel'"/>
335 <xsl:apply-templates/>
340 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
341 <xsl:call-template name="gentext.template">
342 <xsl:with-param name="context" select="'msgset'"/>
343 <xsl:with-param name="name" select="'MsgLevel'"/>
346 <xsl:apply-templates/>
352 <xsl:template match="msgorig">
354 <xsl:when test="$make.clean.html != 0">
355 <div class="msgorig">
356 <span class="msgorig-title">
357 <xsl:call-template name="gentext.template">
358 <xsl:with-param name="context" select="'msgset'"/>
359 <xsl:with-param name="name" select="'MsgOrig'"/>
362 <xsl:apply-templates/>
367 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
368 <xsl:call-template name="gentext.template">
369 <xsl:with-param name="context" select="'msgset'"/>
370 <xsl:with-param name="name" select="'MsgOrig'"/>
373 <xsl:apply-templates/>
379 <xsl:template match="msgaud">
381 <xsl:when test="$make.clean.html != 0">
383 <span class="msgaud-title">
384 <xsl:call-template name="gentext.template">
385 <xsl:with-param name="context" select="'msgset'"/>
386 <xsl:with-param name="name" select="'MsgAud'"/>
389 <xsl:apply-templates/>
394 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
395 <xsl:call-template name="gentext.template">
396 <xsl:with-param name="context" select="'msgset'"/>
397 <xsl:with-param name="name" select="'MsgAud'"/>
400 <xsl:apply-templates/>
406 <xsl:template match="msgexplan">
407 <xsl:call-template name="block.object"/>
410 <xsl:template match="msgexplan/title">
412 <xsl:when test="$make.clean.html != 0">
413 <div class="msgexplan">
414 <span class="msgexplan-title">
415 <xsl:apply-templates/>
421 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
422 <xsl:apply-templates/>
429 <!-- ==================================================================== -->
431 <xsl:template match="revhistory">
433 <xsl:call-template name="common.html.attributes"/>
434 <table border="0" width="100%" summary="Revision history">
436 <th align="{$direction.align.start}" valign="top" colspan="3">
437 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
438 <xsl:call-template name="gentext">
439 <xsl:with-param name="key" select="'RevHistory'"/>
444 <xsl:apply-templates/>
449 <xsl:template match="revhistory/revision">
450 <xsl:variable name="revnumber" select="revnumber"/>
451 <xsl:variable name="revdate" select="date"/>
452 <xsl:variable name="revauthor" select="authorinitials|author"/>
453 <xsl:variable name="revremark" select="revremark|revdescription"/>
455 <td align="{$direction.align.start}">
456 <xsl:if test="$revnumber">
457 <xsl:call-template name="gentext">
458 <xsl:with-param name="key" select="'Revision'"/>
460 <xsl:call-template name="gentext.space"/>
461 <xsl:apply-templates select="$revnumber"/>
464 <td align="{$direction.align.start}">
465 <xsl:apply-templates select="$revdate"/>
468 <xsl:when test="count($revauthor)=0">
469 <td align="{$direction.align.start}">
470 <xsl:call-template name="dingbat">
471 <xsl:with-param name="dingbat">nbsp</xsl:with-param>
476 <td align="{$direction.align.start}">
477 <xsl:for-each select="$revauthor">
478 <xsl:apply-templates select="."/>
479 <xsl:if test="position() != last()">
480 <xsl:text>, </xsl:text>
487 <xsl:if test="$revremark">
489 <td align="{$direction.align.start}" colspan="3">
490 <xsl:apply-templates select="$revremark"/>
496 <xsl:template match="revision/revnumber">
497 <xsl:apply-templates/>
500 <xsl:template match="revision/date">
501 <xsl:apply-templates/>
504 <xsl:template match="revision/authorinitials">
505 <xsl:text>, </xsl:text>
506 <xsl:apply-templates/>
509 <xsl:template match="revision/authorinitials[1]" priority="2">
510 <xsl:apply-templates/>
513 <xsl:template match="revision/revremark">
514 <xsl:apply-templates/>
517 <xsl:template match="revision/revdescription">
518 <xsl:apply-templates/>
521 <!-- ==================================================================== -->
523 <xsl:template match="ackno|acknowledgements[parent::article]">
524 <xsl:call-template name="block.object"/>
527 <!-- ==================================================================== -->
529 <xsl:template match="highlights">
530 <xsl:call-template name="block.object"/>
533 <!-- ==================================================================== -->