block.xsl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  4. version='1.0'>
  5. <!-- ********************************************************************
  6. $Id: block.xsl 9389 2012-06-02 19:02:39Z bobstayton $
  7. ********************************************************************
  8. This file is part of the XSL DocBook Stylesheet distribution.
  9. See ../README or http://docbook.sf.net/release/xsl/current/ for
  10. copyright and other information.
  11. ******************************************************************** -->
  12. <!-- ==================================================================== -->
  13. <xsl:template match="blockinfo|info">
  14. <!-- suppress -->
  15. </xsl:template>
  16. <!-- ==================================================================== -->
  17. <xsl:template name="block.object">
  18. <xsl:variable name="keep.together">
  19. <xsl:call-template name="pi.dbfo_keep-together"/>
  20. </xsl:variable>
  21. <fo:block>
  22. <xsl:if test="$keep.together != ''">
  23. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  24. select="$keep.together"/></xsl:attribute>
  25. </xsl:if>
  26. <xsl:call-template name="anchor"/>
  27. <xsl:apply-templates/>
  28. </fo:block>
  29. </xsl:template>
  30. <!-- ==================================================================== -->
  31. <xsl:template match="para">
  32. <xsl:variable name="keep.together">
  33. <xsl:call-template name="pi.dbfo_keep-together"/>
  34. </xsl:variable>
  35. <fo:block xsl:use-attribute-sets="para.properties">
  36. <xsl:if test="$keep.together != ''">
  37. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  38. select="$keep.together"/></xsl:attribute>
  39. </xsl:if>
  40. <xsl:call-template name="anchor"/>
  41. <xsl:apply-templates/>
  42. </fo:block>
  43. </xsl:template>
  44. <xsl:template match="simpara">
  45. <xsl:variable name="keep.together">
  46. <xsl:call-template name="pi.dbfo_keep-together"/>
  47. </xsl:variable>
  48. <fo:block xsl:use-attribute-sets="normal.para.spacing">
  49. <xsl:if test="$keep.together != ''">
  50. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  51. select="$keep.together"/></xsl:attribute>
  52. </xsl:if>
  53. <xsl:call-template name="anchor"/>
  54. <xsl:apply-templates/>
  55. </fo:block>
  56. </xsl:template>
  57. <xsl:template match="formalpara">
  58. <xsl:variable name="keep.together">
  59. <xsl:call-template name="pi.dbfo_keep-together"/>
  60. </xsl:variable>
  61. <fo:block xsl:use-attribute-sets="normal.para.spacing">
  62. <xsl:if test="$keep.together != ''">
  63. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  64. select="$keep.together"/></xsl:attribute>
  65. </xsl:if>
  66. <xsl:call-template name="anchor"/>
  67. <xsl:apply-templates/>
  68. </fo:block>
  69. </xsl:template>
  70. <!-- Only use title from info -->
  71. <xsl:template match="formalpara/info">
  72. <xsl:apply-templates select="title"/>
  73. </xsl:template>
  74. <xsl:template match="formalpara/title|formalpara/info/title">
  75. <xsl:variable name="titleStr">
  76. <xsl:apply-templates/>
  77. </xsl:variable>
  78. <xsl:variable name="lastChar">
  79. <xsl:if test="$titleStr != ''">
  80. <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
  81. </xsl:if>
  82. </xsl:variable>
  83. <fo:inline font-weight="bold"
  84. keep-with-next.within-line="always"
  85. padding-end="1em">
  86. <xsl:copy-of select="$titleStr"/>
  87. <xsl:if test="$lastChar != ''
  88. and not(contains($runinhead.title.end.punct, $lastChar))">
  89. <xsl:value-of select="$runinhead.default.title.end.punct"/>
  90. </xsl:if>
  91. <xsl:text>&#160;</xsl:text>
  92. </fo:inline>
  93. </xsl:template>
  94. <xsl:template match="formalpara/para">
  95. <xsl:apply-templates/>
  96. </xsl:template>
  97. <!-- ==================================================================== -->
  98. <xsl:template match="blockquote">
  99. <xsl:variable name="keep.together">
  100. <xsl:call-template name="pi.dbfo_keep-together"/>
  101. </xsl:variable>
  102. <fo:block xsl:use-attribute-sets="blockquote.properties">
  103. <xsl:if test="$keep.together != ''">
  104. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  105. select="$keep.together"/></xsl:attribute>
  106. </xsl:if>
  107. <xsl:call-template name="anchor"/>
  108. <fo:block>
  109. <xsl:if test="title|info/title">
  110. <fo:block xsl:use-attribute-sets="formal.title.properties">
  111. <xsl:apply-templates select="." mode="object.title.markup"/>
  112. </fo:block>
  113. </xsl:if>
  114. <xsl:apply-templates select="*[local-name(.) != 'title'
  115. and local-name(.) != 'attribution']"/>
  116. </fo:block>
  117. <xsl:if test="attribution">
  118. <fo:block text-align="right">
  119. <!-- mdash -->
  120. <xsl:text>&#x2014;</xsl:text>
  121. <xsl:apply-templates select="attribution"/>
  122. </fo:block>
  123. </xsl:if>
  124. </fo:block>
  125. </xsl:template>
  126. <!-- 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 -->
  127. <xsl:template match="epigraph">
  128. <fo:block>
  129. <xsl:call-template name="anchor"/>
  130. <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
  131. <xsl:if test="attribution">
  132. <fo:inline>
  133. <xsl:text>&#x2014;</xsl:text>
  134. <xsl:apply-templates select="attribution"/>
  135. </fo:inline>
  136. </xsl:if>
  137. </fo:block>
  138. </xsl:template>
  139. <xsl:template match="attribution">
  140. <fo:inline><xsl:apply-templates/></fo:inline>
  141. </xsl:template>
  142. <!-- ==================================================================== -->
  143. <xsl:template name="floater">
  144. <xsl:param name="position" select="'none'"/>
  145. <xsl:param name="clear" select="'both'"/>
  146. <xsl:param name="width"/>
  147. <xsl:param name="content"/>
  148. <xsl:param name="start.indent">0pt</xsl:param>
  149. <xsl:param name="end.indent">0pt</xsl:param>
  150. <xsl:choose>
  151. <xsl:when test="not($fop.extensions = 0)">
  152. <!-- fop 0.20.5 does not support floats -->
  153. <xsl:copy-of select="$content"/>
  154. </xsl:when>
  155. <xsl:when test="$position = 'none'">
  156. <xsl:copy-of select="$content"/>
  157. </xsl:when>
  158. <xsl:when test="$position = 'before'">
  159. <fo:float float="before">
  160. <xsl:copy-of select="$content"/>
  161. </fo:float>
  162. </xsl:when>
  163. <xsl:when test="$position = 'left' or
  164. $position = 'start' or
  165. $position = 'right' or
  166. $position = 'end' or
  167. $position = 'inside' or
  168. $position = 'outside'">
  169. <xsl:variable name="float">
  170. <fo:float float="{$position}"
  171. clear="{$clear}">
  172. <fo:block-container
  173. start-indent="{$start.indent}"
  174. end-indent="{$end.indent}">
  175. <xsl:if test="$width != ''">
  176. <xsl:attribute name="inline-progression-dimension">
  177. <xsl:value-of select="$width"/>
  178. </xsl:attribute>
  179. </xsl:if>
  180. <fo:block>
  181. <xsl:copy-of select="$content"/>
  182. </fo:block>
  183. </fo:block-container>
  184. </fo:float>
  185. </xsl:variable>
  186. <xsl:choose>
  187. <xsl:when test="$axf.extensions != 0 and self::sidebar">
  188. <fo:block xsl:use-attribute-sets="normal.para.spacing"
  189. space-after="0pt"
  190. space-after.precedence="force"
  191. start-indent="0pt" end-indent="0pt">
  192. <xsl:copy-of select="$float"/>
  193. </fo:block>
  194. </xsl:when>
  195. <xsl:when test="$axf.extensions != 0 and
  196. ($position = 'left' or $position = 'start')">
  197. <fo:float float="{$position}"
  198. clear="{$clear}">
  199. <fo:block-container
  200. inline-progression-dimension=".001mm"
  201. end-indent="{$start.indent} + {$width} + {$end.indent}">
  202. <xsl:attribute name="start-indent">
  203. <xsl:choose>
  204. <xsl:when test="ancestor::para">
  205. <!-- Special case for handling inline floats
  206. in Antenna House-->
  207. <xsl:value-of select="concat('-', $body.start.indent)"/>
  208. </xsl:when>
  209. <xsl:otherwise>0pt</xsl:otherwise>
  210. </xsl:choose>
  211. </xsl:attribute>
  212. <fo:block start-indent="{$start.indent}"
  213. end-indent="-{$start.indent} - {$width}">
  214. <xsl:copy-of select="$content"/>
  215. </fo:block>
  216. </fo:block-container>
  217. </fo:float>
  218. </xsl:when>
  219. <xsl:when test="$axf.extensions != 0 and
  220. ($position = 'right' or $position = 'end')">
  221. <!-- Special case for handling inline floats in Antenna House-->
  222. <fo:float float="{$position}"
  223. clear="{$clear}">
  224. <fo:block-container
  225. inline-progression-dimension=".001mm"
  226. end-indent="-{$body.end.indent}"
  227. start-indent="{$start.indent} + {$width} + {$end.indent}">
  228. <fo:block end-indent="{$end.indent}"
  229. start-indent="-{$end.indent} - {$width}">
  230. <xsl:copy-of select="$content"/>
  231. </fo:block>
  232. </fo:block-container>
  233. </fo:float>
  234. </xsl:when>
  235. <xsl:when test="$xep.extensions != 0 and self::sidebar">
  236. <!-- float needs some space above to line up with following para -->
  237. <fo:block xsl:use-attribute-sets="normal.para.spacing">
  238. <xsl:copy-of select="$float"/>
  239. </fo:block>
  240. </xsl:when>
  241. <xsl:when test="$xep.extensions != 0">
  242. <xsl:copy-of select="$float"/>
  243. </xsl:when>
  244. <xsl:otherwise>
  245. <xsl:copy-of select="$float"/>
  246. </xsl:otherwise>
  247. </xsl:choose>
  248. </xsl:when>
  249. <xsl:otherwise>
  250. <xsl:copy-of select="$content"/>
  251. </xsl:otherwise>
  252. </xsl:choose>
  253. </xsl:template>
  254. <xsl:template match="sidebar" name="sidebar">
  255. <!-- Also does margin notes -->
  256. <xsl:variable name="pi-type">
  257. <xsl:call-template name="pi.dbfo_float-type"/>
  258. </xsl:variable>
  259. <xsl:variable name="id">
  260. <xsl:call-template name="object.id"/>
  261. </xsl:variable>
  262. <xsl:choose>
  263. <xsl:when test="$pi-type = 'margin.note'">
  264. <xsl:call-template name="margin.note"/>
  265. </xsl:when>
  266. <xsl:otherwise>
  267. <xsl:variable name="content">
  268. <fo:block xsl:use-attribute-sets="sidebar.properties"
  269. id="{$id}">
  270. <xsl:call-template name="sidebar.titlepage"/>
  271. <xsl:apply-templates select="node()[not(self::title) and
  272. not(self::info) and
  273. not(self::sidebarinfo)]"/>
  274. </fo:block>
  275. </xsl:variable>
  276. <xsl:variable name="pi-width">
  277. <xsl:call-template name="pi.dbfo_sidebar-width"/>
  278. </xsl:variable>
  279. <xsl:variable name="position">
  280. <xsl:choose>
  281. <xsl:when test="$pi-type != ''">
  282. <xsl:value-of select="$pi-type"/>
  283. </xsl:when>
  284. <xsl:otherwise>
  285. <xsl:value-of select="$sidebar.float.type"/>
  286. </xsl:otherwise>
  287. </xsl:choose>
  288. </xsl:variable>
  289. <xsl:call-template name="floater">
  290. <xsl:with-param name="content" select="$content"/>
  291. <xsl:with-param name="position" select="$position"/>
  292. <xsl:with-param name="width">
  293. <xsl:choose>
  294. <xsl:when test="$pi-width != ''">
  295. <xsl:value-of select="$pi-width"/>
  296. </xsl:when>
  297. <xsl:otherwise>
  298. <xsl:value-of select="$sidebar.float.width"/>
  299. </xsl:otherwise>
  300. </xsl:choose>
  301. </xsl:with-param>
  302. <xsl:with-param name="start.indent">
  303. <xsl:choose>
  304. <xsl:when test="$position = 'start' or
  305. $position = 'left'">0pt</xsl:when>
  306. <xsl:when test="$position = 'end' or
  307. $position = 'right'">0.5em</xsl:when>
  308. <xsl:otherwise>0pt</xsl:otherwise>
  309. </xsl:choose>
  310. </xsl:with-param>
  311. <xsl:with-param name="end.indent">
  312. <xsl:choose>
  313. <xsl:when test="$position = 'start' or
  314. $position = 'left'">0.5em</xsl:when>
  315. <xsl:when test="$position = 'end' or
  316. $position = 'right'">0pt</xsl:when>
  317. <xsl:otherwise>0pt</xsl:otherwise>
  318. </xsl:choose>
  319. </xsl:with-param>
  320. </xsl:call-template>
  321. </xsl:otherwise>
  322. </xsl:choose>
  323. </xsl:template>
  324. <xsl:template match="sidebar/title|sidebarinfo|sidebar/info"/>
  325. <xsl:template match="sidebar/title|sidebarinfo/title|sidebar/info/title"
  326. mode="titlepage.mode" priority="1">
  327. <fo:block xsl:use-attribute-sets="sidebar.title.properties">
  328. <xsl:apply-templates/>
  329. </fo:block>
  330. </xsl:template>
  331. <!-- Turn off para space-before if sidebar starts with a para, not title -->
  332. <xsl:template match="sidebar/*[1][self::para]">
  333. <xsl:variable name="keep.together">
  334. <xsl:call-template name="pi.dbfo_keep-together"/>
  335. </xsl:variable>
  336. <fo:block xsl:use-attribute-sets="para.properties">
  337. <xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
  338. <xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
  339. <xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
  340. <xsl:if test="$keep.together != ''">
  341. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  342. select="$keep.together"/></xsl:attribute>
  343. </xsl:if>
  344. <xsl:call-template name="anchor"/>
  345. <xsl:apply-templates/>
  346. </fo:block>
  347. </xsl:template>
  348. <xsl:template name="margin.note">
  349. <xsl:param name="content">
  350. <fo:block xsl:use-attribute-sets="margin.note.properties">
  351. <xsl:if test="./title">
  352. <fo:block xsl:use-attribute-sets="margin.note.title.properties">
  353. <xsl:apply-templates select="./title" mode="margin.note.title.mode"/>
  354. </fo:block>
  355. </xsl:if>
  356. <xsl:apply-templates/>
  357. </fo:block>
  358. </xsl:param>
  359. <xsl:variable name="pi-width">
  360. <xsl:call-template name="pi.dbfo_sidebar-width"/>
  361. </xsl:variable>
  362. <xsl:variable name="position" select="$margin.note.float.type"/>
  363. <xsl:call-template name="floater">
  364. <xsl:with-param name="content" select="$content"/>
  365. <xsl:with-param name="position" select="$position"/>
  366. <xsl:with-param name="width" >
  367. <xsl:choose>
  368. <xsl:when test="$pi-width != ''">
  369. <xsl:value-of select="$pi-width"/>
  370. </xsl:when>
  371. <xsl:otherwise>
  372. <xsl:value-of select="$margin.note.width"/>
  373. </xsl:otherwise>
  374. </xsl:choose>
  375. </xsl:with-param>
  376. <xsl:with-param name="start.indent">
  377. <xsl:choose>
  378. <xsl:when test="$position = 'start' or
  379. $position = 'left'">0pt</xsl:when>
  380. <xsl:when test="$position = 'end' or
  381. $position = 'right'">0.5em</xsl:when>
  382. <xsl:otherwise>0pt</xsl:otherwise>
  383. </xsl:choose>
  384. </xsl:with-param>
  385. <xsl:with-param name="end.indent">
  386. <xsl:choose>
  387. <xsl:when test="$position = 'start' or
  388. $position = 'left'">0.5em</xsl:when>
  389. <xsl:when test="$position = 'end' or
  390. $position = 'right'">0pt</xsl:when>
  391. <xsl:otherwise>0pt</xsl:otherwise>
  392. </xsl:choose>
  393. </xsl:with-param>
  394. </xsl:call-template>
  395. </xsl:template>
  396. <xsl:template match="sidebar/title" mode="margin.note.title.mode">
  397. <xsl:apply-templates/>
  398. </xsl:template>
  399. <!-- ==================================================================== -->
  400. <xsl:template match="abstract">
  401. <xsl:variable name="keep.together">
  402. <xsl:call-template name="pi.dbfo_keep-together"/>
  403. </xsl:variable>
  404. <fo:block xsl:use-attribute-sets="abstract.properties">
  405. <xsl:if test="$keep.together != ''">
  406. <xsl:attribute name="keep-together.within-column"><xsl:value-of
  407. select="$keep.together"/></xsl:attribute>
  408. </xsl:if>
  409. <xsl:call-template name="anchor"/>
  410. <xsl:apply-templates/>
  411. </fo:block>
  412. </xsl:template>
  413. <xsl:template match="abstract/title|abstract/info/title">
  414. <fo:block xsl:use-attribute-sets="abstract.title.properties">
  415. <xsl:apply-templates/>
  416. </fo:block>
  417. </xsl:template>
  418. <!-- ==================================================================== -->
  419. <xsl:template match="msgset">
  420. <xsl:apply-templates/>
  421. </xsl:template>
  422. <xsl:template match="msgentry">
  423. <xsl:call-template name="block.object"/>
  424. </xsl:template>
  425. <xsl:template match="simplemsgentry">
  426. <xsl:call-template name="block.object"/>
  427. </xsl:template>
  428. <xsl:template match="msg">
  429. <xsl:call-template name="block.object"/>
  430. </xsl:template>
  431. <xsl:template match="msgmain">
  432. <xsl:apply-templates/>
  433. </xsl:template>
  434. <xsl:template match="msgsub">
  435. <xsl:apply-templates/>
  436. </xsl:template>
  437. <xsl:template match="msgrel">
  438. <xsl:apply-templates/>
  439. </xsl:template>
  440. <xsl:template match="msgtext">
  441. <xsl:apply-templates/>
  442. </xsl:template>
  443. <xsl:template match="msginfo">
  444. <xsl:call-template name="block.object"/>
  445. </xsl:template>
  446. <xsl:template match="msglevel">
  447. <fo:block>
  448. <fo:inline font-weight="bold"
  449. keep-with-next.within-line="always">
  450. <xsl:call-template name="gentext.template">
  451. <xsl:with-param name="context" select="'msgset'"/>
  452. <xsl:with-param name="name" select="'MsgLevel'"/>
  453. </xsl:call-template>
  454. </fo:inline>
  455. <xsl:apply-templates/>
  456. </fo:block>
  457. </xsl:template>
  458. <xsl:template match="msgorig">
  459. <fo:block>
  460. <fo:inline font-weight="bold"
  461. keep-with-next.within-line="always">
  462. <xsl:call-template name="gentext.template">
  463. <xsl:with-param name="context" select="'msgset'"/>
  464. <xsl:with-param name="name" select="'MsgOrig'"/>
  465. </xsl:call-template>
  466. </fo:inline>
  467. <xsl:apply-templates/>
  468. </fo:block>
  469. </xsl:template>
  470. <xsl:template match="msgaud">
  471. <fo:block>
  472. <fo:inline font-weight="bold"
  473. keep-with-next.within-line="always">
  474. <xsl:call-template name="gentext.template">
  475. <xsl:with-param name="context" select="'msgset'"/>
  476. <xsl:with-param name="name" select="'MsgAud'"/>
  477. </xsl:call-template>
  478. </fo:inline>
  479. <xsl:apply-templates/>
  480. </fo:block>
  481. </xsl:template>
  482. <xsl:template match="msgexplan">
  483. <xsl:call-template name="block.object"/>
  484. </xsl:template>
  485. <xsl:template match="msgexplan/title">
  486. <fo:block font-weight="bold"
  487. keep-with-next.within-column="always"
  488. hyphenate="false">
  489. <xsl:apply-templates/>
  490. </fo:block>
  491. </xsl:template>
  492. <!-- ==================================================================== -->
  493. <!-- For better or worse, revhistory is allowed in content... -->
  494. <xsl:template match="revhistory">
  495. <fo:table table-layout="fixed" xsl:use-attribute-sets="revhistory.table.properties">
  496. <xsl:call-template name="anchor"/>
  497. <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
  498. <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
  499. <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
  500. <fo:table-body start-indent="0pt" end-indent="0pt">
  501. <fo:table-row>
  502. <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
  503. <fo:block xsl:use-attribute-sets="revhistory.title.properties">
  504. <xsl:choose>
  505. <xsl:when test="title|info/title">
  506. <xsl:apply-templates select="title|info/title" mode="titlepage.mode"/>
  507. </xsl:when>
  508. <xsl:otherwise>
  509. <xsl:call-template name="gentext">
  510. <xsl:with-param name="key" select="'RevHistory'"/>
  511. </xsl:call-template>
  512. </xsl:otherwise>
  513. </xsl:choose>
  514. </fo:block>
  515. </fo:table-cell>
  516. </fo:table-row>
  517. <xsl:apply-templates/>
  518. </fo:table-body>
  519. </fo:table>
  520. </xsl:template>
  521. <xsl:template match="revhistory/title">
  522. <!-- Handled in titlepage.mode -->
  523. </xsl:template>
  524. <xsl:template match="revhistory/revision">
  525. <xsl:variable name="revnumber" select="revnumber"/>
  526. <xsl:variable name="revdate" select="date"/>
  527. <xsl:variable name="revauthor" select="authorinitials|author"/>
  528. <xsl:variable name="revremark" select="revremark|revdescription"/>
  529. <fo:table-row>
  530. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  531. <fo:block>
  532. <xsl:call-template name="anchor"/>
  533. <xsl:if test="$revnumber">
  534. <xsl:call-template name="gentext">
  535. <xsl:with-param name="key" select="'Revision'"/>
  536. </xsl:call-template>
  537. <xsl:call-template name="gentext.space"/>
  538. <xsl:apply-templates select="$revnumber[1]"/>
  539. </xsl:if>
  540. </fo:block>
  541. </fo:table-cell>
  542. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  543. <fo:block>
  544. <xsl:apply-templates select="$revdate[1]"/>
  545. </fo:block>
  546. </fo:table-cell>
  547. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  548. <fo:block>
  549. <xsl:for-each select="$revauthor">
  550. <xsl:apply-templates select="."/>
  551. <xsl:if test="position() != last()">
  552. <xsl:text>, </xsl:text>
  553. </xsl:if>
  554. </xsl:for-each>
  555. </fo:block>
  556. </fo:table-cell>
  557. </fo:table-row>
  558. <xsl:if test="$revremark">
  559. <fo:table-row>
  560. <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
  561. <fo:block>
  562. <xsl:apply-templates select="$revremark[1]"/>
  563. </fo:block>
  564. </fo:table-cell>
  565. </fo:table-row>
  566. </xsl:if>
  567. </xsl:template>
  568. <xsl:template match="revision/revnumber">
  569. <xsl:apply-templates/>
  570. </xsl:template>
  571. <xsl:template match="revision/date">
  572. <xsl:apply-templates/>
  573. </xsl:template>
  574. <xsl:template match="revision/authorinitials">
  575. <xsl:apply-templates/>
  576. </xsl:template>
  577. <xsl:template match="revision/author">
  578. <xsl:apply-templates/>
  579. </xsl:template>
  580. <xsl:template match="revision/revremark">
  581. <xsl:apply-templates/>
  582. </xsl:template>
  583. <xsl:template match="revision/revdescription">
  584. <xsl:apply-templates/>
  585. </xsl:template>
  586. <!-- ==================================================================== -->
  587. <xsl:template match="ackno|acknowledgements[parent::article]">
  588. <fo:block xsl:use-attribute-sets="normal.para.spacing">
  589. <xsl:call-template name="anchor"/>
  590. <xsl:apply-templates/>
  591. </fo:block>
  592. </xsl:template>
  593. <!-- ==================================================================== -->
  594. <xsl:template match="highlights">
  595. <xsl:call-template name="block.object"/>
  596. </xsl:template>
  597. <!-- ==================================================================== -->
  598. </xsl:stylesheet>