titlepage.xsl 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  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: titlepage.xsl 9286 2012-04-19 10:10:58Z 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:attribute-set name="book.titlepage.recto.style">
  14. <xsl:attribute name="font-family">
  15. <xsl:value-of select="$title.fontset"/>
  16. </xsl:attribute>
  17. <xsl:attribute name="font-weight">bold</xsl:attribute>
  18. <xsl:attribute name="font-size">12pt</xsl:attribute>
  19. <xsl:attribute name="text-align">center</xsl:attribute>
  20. </xsl:attribute-set>
  21. <xsl:attribute-set name="book.titlepage.verso.style">
  22. <xsl:attribute name="font-size">10pt</xsl:attribute>
  23. </xsl:attribute-set>
  24. <xsl:attribute-set name="article.titlepage.recto.style"/>
  25. <xsl:attribute-set name="article.titlepage.verso.style"/>
  26. <xsl:attribute-set name="set.titlepage.recto.style"/>
  27. <xsl:attribute-set name="set.titlepage.verso.style"/>
  28. <xsl:attribute-set name="part.titlepage.recto.style">
  29. <xsl:attribute name="text-align">center</xsl:attribute>
  30. </xsl:attribute-set>
  31. <xsl:attribute-set name="part.titlepage.verso.style"/>
  32. <xsl:attribute-set name="partintro.titlepage.recto.style"/>
  33. <xsl:attribute-set name="partintro.titlepage.verso.style"/>
  34. <xsl:attribute-set name="reference.titlepage.recto.style"/>
  35. <xsl:attribute-set name="reference.titlepage.verso.style"/>
  36. <xsl:attribute-set name="dedication.titlepage.recto.style"/>
  37. <xsl:attribute-set name="dedication.titlepage.verso.style"/>
  38. <xsl:attribute-set name="acknowledgements.titlepage.recto.style"/>
  39. <xsl:attribute-set name="acknowledgements.titlepage.verso.style"/>
  40. <xsl:attribute-set name="preface.titlepage.recto.style"/>
  41. <xsl:attribute-set name="preface.titlepage.verso.style"/>
  42. <xsl:attribute-set name="chapter.titlepage.recto.style"/>
  43. <xsl:attribute-set name="chapter.titlepage.verso.style"/>
  44. <xsl:attribute-set name="appendix.titlepage.recto.style"/>
  45. <xsl:attribute-set name="appendix.titlepage.verso.style"/>
  46. <xsl:attribute-set name="bibliography.titlepage.recto.style"/>
  47. <xsl:attribute-set name="bibliography.titlepage.verso.style"/>
  48. <xsl:attribute-set name="bibliodiv.titlepage.recto.style"/>
  49. <xsl:attribute-set name="bibliodiv.titlepage.verso.style"/>
  50. <xsl:attribute-set name="glossary.titlepage.recto.style"/>
  51. <xsl:attribute-set name="glossary.titlepage.verso.style"/>
  52. <xsl:attribute-set name="glossdiv.titlepage.recto.style"/>
  53. <xsl:attribute-set name="glossdiv.titlepage.verso.style"/>
  54. <xsl:attribute-set name="index.titlepage.recto.style"/>
  55. <xsl:attribute-set name="index.titlepage.verso.style"/>
  56. <xsl:attribute-set name="setindex.titlepage.recto.style"/>
  57. <xsl:attribute-set name="setindex.titlepage.verso.style"/>
  58. <xsl:attribute-set name="indexdiv.titlepage.recto.style"/>
  59. <xsl:attribute-set name="indexdiv.titlepage.verso.style"/>
  60. <xsl:attribute-set name="colophon.titlepage.recto.style"/>
  61. <xsl:attribute-set name="colophon.titlepage.verso.style"/>
  62. <xsl:attribute-set name="sidebar.titlepage.recto.style"/>
  63. <xsl:attribute-set name="sidebar.titlepage.verso.style"/>
  64. <xsl:attribute-set name="qandaset.titlepage.recto.style"/>
  65. <xsl:attribute-set name="qandaset.titlepage.verso.style"/>
  66. <xsl:attribute-set name="section.titlepage.recto.style">
  67. <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  68. </xsl:attribute-set>
  69. <xsl:attribute-set name="section.titlepage.verso.style">
  70. <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  71. <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
  72. </xsl:attribute-set>
  73. <xsl:attribute-set name="sect1.titlepage.recto.style"
  74. use-attribute-sets="section.titlepage.recto.style"/>
  75. <xsl:attribute-set name="sect1.titlepage.verso.style"
  76. use-attribute-sets="section.titlepage.verso.style"/>
  77. <xsl:attribute-set name="sect2.titlepage.recto.style"
  78. use-attribute-sets="section.titlepage.recto.style"/>
  79. <xsl:attribute-set name="sect2.titlepage.verso.style"
  80. use-attribute-sets="section.titlepage.verso.style"/>
  81. <xsl:attribute-set name="sect3.titlepage.recto.style"
  82. use-attribute-sets="section.titlepage.recto.style"/>
  83. <xsl:attribute-set name="sect3.titlepage.verso.style"
  84. use-attribute-sets="section.titlepage.verso.style"/>
  85. <xsl:attribute-set name="sect4.titlepage.recto.style"
  86. use-attribute-sets="section.titlepage.recto.style"/>
  87. <xsl:attribute-set name="sect4.titlepage.verso.style"
  88. use-attribute-sets="section.titlepage.verso.style"/>
  89. <xsl:attribute-set name="sect5.titlepage.recto.style"
  90. use-attribute-sets="section.titlepage.recto.style"/>
  91. <xsl:attribute-set name="sect5.titlepage.verso.style"
  92. use-attribute-sets="section.titlepage.verso.style"/>
  93. <xsl:attribute-set name="simplesect.titlepage.recto.style"
  94. use-attribute-sets="section.titlepage.recto.style"/>
  95. <xsl:attribute-set name="simplesect.titlepage.verso.style"
  96. use-attribute-sets="section.titlepage.verso.style"/>
  97. <xsl:attribute-set name="topic.titlepage.recto.style"/>
  98. <xsl:attribute-set name="topic.titlepage.verso.style"/>
  99. <xsl:attribute-set name="refnamediv.titlepage.recto.style"
  100. use-attribute-sets="section.titlepage.recto.style"/>
  101. <xsl:attribute-set name="refnamediv.titlepage.verso.style"
  102. use-attribute-sets="section.titlepage.verso.style"/>
  103. <xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style"
  104. use-attribute-sets="section.titlepage.recto.style"/>
  105. <xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style"
  106. use-attribute-sets="section.titlepage.verso.style"/>
  107. <xsl:attribute-set name="refsection.titlepage.recto.style"
  108. use-attribute-sets="section.titlepage.recto.style"/>
  109. <xsl:attribute-set name="refsection.titlepage.verso.style"
  110. use-attribute-sets="section.titlepage.verso.style"/>
  111. <xsl:attribute-set name="refsect1.titlepage.recto.style"
  112. use-attribute-sets="section.titlepage.recto.style"/>
  113. <xsl:attribute-set name="refsect1.titlepage.verso.style"
  114. use-attribute-sets="section.titlepage.verso.style"/>
  115. <xsl:attribute-set name="refsect2.titlepage.recto.style"
  116. use-attribute-sets="section.titlepage.recto.style"/>
  117. <xsl:attribute-set name="refsect2.titlepage.verso.style"
  118. use-attribute-sets="section.titlepage.verso.style"/>
  119. <xsl:attribute-set name="refsect3.titlepage.recto.style"
  120. use-attribute-sets="section.titlepage.recto.style"/>
  121. <xsl:attribute-set name="refsect3.titlepage.verso.style"
  122. use-attribute-sets="section.titlepage.verso.style"/>
  123. <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
  124. <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
  125. <xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
  126. <xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
  127. <xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
  128. <xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
  129. <xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
  130. <xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
  131. <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
  132. <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
  133. <xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/>
  134. <xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/>
  135. <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
  136. <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
  137. <xsl:attribute-set name="component.list.of.tables.titlepage.recto.style"/>
  138. <xsl:attribute-set name="component.list.of.tables.contents.titlepage.verso.style"/>
  139. <xsl:attribute-set name="component.list.of.figures.titlepage.recto.style"/>
  140. <xsl:attribute-set name="component.list.of.figures.contents.titlepage.verso.style"/>
  141. <xsl:attribute-set name="component.list.of.equations.titlepage.recto.style"/>
  142. <xsl:attribute-set name="component.list.of.equations.contents.titlepage.verso.style"/>
  143. <xsl:attribute-set name="component.list.of.examples.titlepage.recto.style"/>
  144. <xsl:attribute-set name="component.list.of.examples.contents.titlepage.verso.style"/>
  145. <xsl:attribute-set name="component.list.of.procedures.titlepage.recto.style"/>
  146. <xsl:attribute-set name="component.list.of.procedures.contents.titlepage.verso.style"/>
  147. <xsl:attribute-set name="component.list.of.unknowns.titlepage.recto.style"/>
  148. <xsl:attribute-set name="component.list.of.unknowns.contents.titlepage.verso.style"/>
  149. <!-- ==================================================================== -->
  150. <xsl:template match="*" mode="titlepage.mode">
  151. <!-- if an element isn't found in this mode, try the default mode -->
  152. <xsl:apply-templates select="."/>
  153. </xsl:template>
  154. <xsl:template match="abbrev" mode="titlepage.mode">
  155. <xsl:apply-templates mode="titlepage.mode"/>
  156. </xsl:template>
  157. <xsl:template match="abstract" mode="titlepage.mode">
  158. <fo:block xsl:use-attribute-sets="abstract.properties">
  159. <fo:block xsl:use-attribute-sets="abstract.title.properties">
  160. <xsl:choose>
  161. <xsl:when test="title|info/title">
  162. <xsl:apply-templates select="title|info/title"/>
  163. </xsl:when>
  164. <xsl:otherwise>
  165. <xsl:call-template name="gentext">
  166. <xsl:with-param name="key" select="'Abstract'"/>
  167. </xsl:call-template>
  168. </xsl:otherwise>
  169. </xsl:choose>
  170. </fo:block>
  171. <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/>
  172. </fo:block>
  173. </xsl:template>
  174. <xsl:template match="abstract/title" mode="titlepage.mode"/>
  175. <xsl:template match="abstract/title" mode="titlepage.abstract.title.mode">
  176. <xsl:apply-templates mode="titlepage.mode"/>
  177. </xsl:template>
  178. <xsl:template match="address" mode="titlepage.mode">
  179. <!-- use the normal address handling code -->
  180. <xsl:apply-templates select="."/>
  181. </xsl:template>
  182. <xsl:template match="affiliation" mode="titlepage.mode">
  183. <fo:block>
  184. <xsl:apply-templates mode="titlepage.mode"/>
  185. </fo:block>
  186. </xsl:template>
  187. <xsl:template match="artpagenums" mode="titlepage.mode">
  188. <xsl:apply-templates mode="titlepage.mode"/>
  189. </xsl:template>
  190. <xsl:template match="author" mode="titlepage.mode">
  191. <fo:block>
  192. <xsl:call-template name="anchor"/>
  193. <xsl:choose>
  194. <xsl:when test="orgname">
  195. <xsl:apply-templates/>
  196. </xsl:when>
  197. <xsl:otherwise>
  198. <xsl:call-template name="person.name"/>
  199. <xsl:if test="affiliation/orgname">
  200. <xsl:text>, </xsl:text>
  201. <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/>
  202. </xsl:if>
  203. <xsl:if test="email|affiliation/address/email">
  204. <xsl:text> </xsl:text>
  205. <xsl:apply-templates select="(email|affiliation/address/email)[1]"/>
  206. </xsl:if>
  207. </xsl:otherwise>
  208. </xsl:choose>
  209. </fo:block>
  210. </xsl:template>
  211. <xsl:template match="authorblurb" mode="titlepage.mode">
  212. <xsl:apply-templates mode="titlepage.mode"/>
  213. </xsl:template>
  214. <xsl:template match="authorgroup" mode="titlepage.mode">
  215. <fo:wrapper>
  216. <xsl:call-template name="anchor"/>
  217. <xsl:apply-templates mode="titlepage.mode"/>
  218. </fo:wrapper>
  219. </xsl:template>
  220. <xsl:template match="authorinitials" mode="titlepage.mode">
  221. <xsl:apply-templates mode="titlepage.mode"/>
  222. </xsl:template>
  223. <xsl:template match="bibliomisc" mode="titlepage.mode">
  224. <xsl:apply-templates mode="titlepage.mode"/>
  225. </xsl:template>
  226. <xsl:template match="bibliomset" mode="titlepage.mode">
  227. <xsl:apply-templates mode="titlepage.mode"/>
  228. </xsl:template>
  229. <xsl:template match="collab" mode="titlepage.mode">
  230. <xsl:apply-templates mode="titlepage.mode"/>
  231. </xsl:template>
  232. <xsl:template match="collabname" mode="titlepage.mode">
  233. <xsl:apply-templates mode="titlepage.mode"/>
  234. </xsl:template>
  235. <xsl:template match="confgroup" mode="titlepage.mode">
  236. <fo:block>
  237. <xsl:apply-templates mode="titlepage.mode"/>
  238. </fo:block>
  239. </xsl:template>
  240. <xsl:template match="confdates" mode="titlepage.mode">
  241. <fo:block>
  242. <xsl:apply-templates mode="titlepage.mode"/>
  243. </fo:block>
  244. </xsl:template>
  245. <xsl:template match="conftitle" mode="titlepage.mode">
  246. <fo:block>
  247. <xsl:apply-templates mode="titlepage.mode"/>
  248. </fo:block>
  249. </xsl:template>
  250. <xsl:template match="confnum" mode="titlepage.mode">
  251. <!-- suppress -->
  252. </xsl:template>
  253. <xsl:template match="contractnum" mode="titlepage.mode">
  254. <xsl:apply-templates mode="titlepage.mode"/>
  255. </xsl:template>
  256. <xsl:template match="contractsponsor" mode="titlepage.mode">
  257. <xsl:apply-templates mode="titlepage.mode"/>
  258. </xsl:template>
  259. <xsl:template match="contrib" mode="titlepage.mode">
  260. <xsl:apply-templates mode="titlepage.mode"/>
  261. </xsl:template>
  262. <xsl:template match="copyright" mode="titlepage.mode">
  263. <xsl:call-template name="gentext">
  264. <xsl:with-param name="key" select="'Copyright'"/>
  265. </xsl:call-template>
  266. <xsl:call-template name="gentext.space"/>
  267. <xsl:call-template name="dingbat">
  268. <xsl:with-param name="dingbat">copyright</xsl:with-param>
  269. </xsl:call-template>
  270. <xsl:call-template name="gentext.space"/>
  271. <xsl:call-template name="copyright.years">
  272. <xsl:with-param name="years" select="year"/>
  273. <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
  274. <xsl:with-param name="single.year.ranges"
  275. select="$make.single.year.ranges"/>
  276. </xsl:call-template>
  277. <xsl:call-template name="gentext.space"/>
  278. <xsl:apply-templates select="holder" mode="titlepage.mode"/>
  279. </xsl:template>
  280. <xsl:template match="year" mode="titlepage.mode">
  281. <xsl:apply-templates/>
  282. </xsl:template>
  283. <xsl:template match="holder" mode="titlepage.mode">
  284. <xsl:apply-templates/>
  285. <xsl:if test="position() &lt; last()">
  286. <xsl:text>, </xsl:text>
  287. </xsl:if>
  288. </xsl:template>
  289. <xsl:template match="corpauthor" mode="titlepage.mode">
  290. <xsl:apply-templates mode="titlepage.mode"/>
  291. </xsl:template>
  292. <xsl:template match="corpcredit" mode="titlepage.mode">
  293. <xsl:apply-templates mode="titlepage.mode"/>
  294. </xsl:template>
  295. <xsl:template match="corpname" mode="titlepage.mode">
  296. <xsl:apply-templates mode="titlepage.mode"/>
  297. </xsl:template>
  298. <xsl:template match="date" mode="titlepage.mode">
  299. <xsl:apply-templates mode="titlepage.mode"/>
  300. </xsl:template>
  301. <xsl:template match="edition" mode="titlepage.mode">
  302. <xsl:apply-templates mode="titlepage.mode"/>
  303. <xsl:call-template name="gentext.space"/>
  304. <xsl:call-template name="gentext">
  305. <xsl:with-param name="key" select="'Edition'"/>
  306. </xsl:call-template>
  307. </xsl:template>
  308. <xsl:template match="editor" mode="titlepage.mode">
  309. <!-- The first editor is dealt with in the following template,
  310. which in turn displays all editors of the same mode. -->
  311. </xsl:template>
  312. <xsl:template match="editor[1]" priority="2" mode="titlepage.mode">
  313. <xsl:call-template name="gentext.edited.by"/>
  314. <xsl:call-template name="gentext.space"/>
  315. <xsl:call-template name="person.name.list">
  316. <xsl:with-param name="person.list" select="../editor"/>
  317. </xsl:call-template>
  318. </xsl:template>
  319. <xsl:template match="firstname" mode="titlepage.mode">
  320. <xsl:apply-templates mode="titlepage.mode"/>
  321. </xsl:template>
  322. <xsl:template match="graphic" mode="titlepage.mode">
  323. <!-- use the normal graphic handling code -->
  324. <xsl:apply-templates select="."/>
  325. </xsl:template>
  326. <xsl:template match="honorific" mode="titlepage.mode">
  327. <xsl:apply-templates mode="titlepage.mode"/>
  328. </xsl:template>
  329. <xsl:template match="isbn" mode="titlepage.mode">
  330. <xsl:apply-templates mode="titlepage.mode"/>
  331. </xsl:template>
  332. <xsl:template match="issn" mode="titlepage.mode">
  333. <xsl:apply-templates mode="titlepage.mode"/>
  334. </xsl:template>
  335. <xsl:template match="biblioid" mode="titlepage.mode">
  336. <xsl:apply-templates mode="titlepage.mode"/>
  337. </xsl:template>
  338. <xsl:template match="itermset" mode="titlepage.mode">
  339. <xsl:apply-templates select="indexterm"/>
  340. </xsl:template>
  341. <xsl:template match="invpartnumber" mode="titlepage.mode">
  342. <xsl:apply-templates mode="titlepage.mode"/>
  343. </xsl:template>
  344. <xsl:template match="issuenum" mode="titlepage.mode">
  345. <xsl:apply-templates mode="titlepage.mode"/>
  346. </xsl:template>
  347. <xsl:template match="jobtitle" mode="titlepage.mode">
  348. <fo:block>
  349. <xsl:apply-templates mode="titlepage.mode"/>
  350. </fo:block>
  351. </xsl:template>
  352. <xsl:template match="keywordset" mode="titlepage.mode">
  353. </xsl:template>
  354. <xsl:template match="legalnotice" mode="titlepage.mode">
  355. <xsl:variable name="id">
  356. <xsl:call-template name="object.id"/>
  357. </xsl:variable>
  358. <fo:block id="{$id}">
  359. <xsl:if test="title"> <!-- FIXME: add param for using default title? -->
  360. <xsl:call-template name="formal.object.heading"/>
  361. </xsl:if>
  362. <xsl:apply-templates mode="titlepage.mode"/>
  363. </fo:block>
  364. </xsl:template>
  365. <xsl:template match="legalnotice/title" mode="titlepage.mode">
  366. </xsl:template>
  367. <xsl:template match="lineage" mode="titlepage.mode">
  368. <xsl:apply-templates mode="titlepage.mode"/>
  369. </xsl:template>
  370. <xsl:template match="modespec" mode="titlepage.mode">
  371. <!-- discard -->
  372. </xsl:template>
  373. <xsl:template match="orgdiv" mode="titlepage.mode">
  374. <xsl:if test="preceding-sibling::*[1][self::orgname]">
  375. <xsl:text> </xsl:text>
  376. </xsl:if>
  377. <xsl:apply-templates mode="titlepage.mode"/>
  378. </xsl:template>
  379. <xsl:template match="orgname" mode="titlepage.mode">
  380. <xsl:apply-templates mode="titlepage.mode"/>
  381. </xsl:template>
  382. <xsl:template match="othercredit" mode="titlepage.mode">
  383. <xsl:variable name="contrib" select="string(contrib)"/>
  384. <xsl:choose>
  385. <xsl:when test="contrib">
  386. <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
  387. <fo:block>
  388. <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
  389. <xsl:text>: </xsl:text>
  390. <xsl:call-template name="person.name"/>
  391. <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
  392. <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
  393. </fo:block>
  394. </xsl:if>
  395. </xsl:when>
  396. <xsl:otherwise>
  397. <fo:block><xsl:call-template name="person.name"/></fo:block>
  398. <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
  399. </xsl:otherwise>
  400. </xsl:choose>
  401. </xsl:template>
  402. <xsl:template match="othercredit" mode="titlepage.othercredits">
  403. <xsl:text>, </xsl:text>
  404. <xsl:call-template name="person.name"/>
  405. </xsl:template>
  406. <xsl:template match="othername" mode="titlepage.mode">
  407. <xsl:apply-templates mode="titlepage.mode"/>
  408. </xsl:template>
  409. <xsl:template match="pagenums" mode="titlepage.mode">
  410. <xsl:apply-templates mode="titlepage.mode"/>
  411. </xsl:template>
  412. <xsl:template match="printhistory" mode="titlepage.mode">
  413. <xsl:apply-templates mode="titlepage.mode"/>
  414. </xsl:template>
  415. <xsl:template match="productname" mode="titlepage.mode">
  416. <xsl:apply-templates mode="titlepage.mode"/>
  417. </xsl:template>
  418. <xsl:template match="productnumber" mode="titlepage.mode">
  419. <xsl:apply-templates mode="titlepage.mode"/>
  420. </xsl:template>
  421. <xsl:template match="pubdate" mode="titlepage.mode">
  422. <xsl:apply-templates mode="titlepage.mode"/>
  423. </xsl:template>
  424. <xsl:template match="publisher" mode="titlepage.mode">
  425. <fo:block>
  426. <xsl:apply-templates mode="titlepage.mode"/>
  427. </fo:block>
  428. </xsl:template>
  429. <xsl:template match="publishername" mode="titlepage.mode">
  430. <xsl:apply-templates mode="titlepage.mode"/>
  431. </xsl:template>
  432. <xsl:template match="pubsnumber" mode="titlepage.mode">
  433. <xsl:apply-templates mode="titlepage.mode"/>
  434. </xsl:template>
  435. <xsl:template match="releaseinfo" mode="titlepage.mode">
  436. <xsl:apply-templates mode="titlepage.mode"/>
  437. </xsl:template>
  438. <xsl:template match="revhistory" mode="titlepage.mode">
  439. <xsl:variable name="explicit.table.width">
  440. <xsl:call-template name="pi.dbfo_table-width"/>
  441. </xsl:variable>
  442. <xsl:variable name="table.width">
  443. <xsl:choose>
  444. <xsl:when test="$explicit.table.width != ''">
  445. <xsl:value-of select="$explicit.table.width"/>
  446. </xsl:when>
  447. <xsl:when test="$default.table.width = ''">
  448. <xsl:text>100%</xsl:text>
  449. </xsl:when>
  450. <xsl:otherwise>
  451. <xsl:value-of select="$default.table.width"/>
  452. </xsl:otherwise>
  453. </xsl:choose>
  454. </xsl:variable>
  455. <fo:table table-layout="fixed" width="{$table.width}" xsl:use-attribute-sets="revhistory.table.properties">
  456. <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
  457. <fo:table-column column-number="2" column-width="proportional-column-width(1)"/>
  458. <fo:table-column column-number="3" column-width="proportional-column-width(1)"/>
  459. <fo:table-body start-indent="0pt" end-indent="0pt">
  460. <fo:table-row>
  461. <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
  462. <fo:block xsl:use-attribute-sets="revhistory.title.properties">
  463. <xsl:choose>
  464. <xsl:when test="title|info/title">
  465. <xsl:apply-templates select="title|info/title" mode="titlepage.mode"/>
  466. </xsl:when>
  467. <xsl:otherwise>
  468. <xsl:call-template name="gentext">
  469. <xsl:with-param name="key" select="'RevHistory'"/>
  470. </xsl:call-template>
  471. </xsl:otherwise>
  472. </xsl:choose>
  473. </fo:block>
  474. </fo:table-cell>
  475. </fo:table-row>
  476. <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/>
  477. </fo:table-body>
  478. </fo:table>
  479. </xsl:template>
  480. <xsl:template match="revhistory/revision" mode="titlepage.mode">
  481. <xsl:variable name="revnumber" select="revnumber"/>
  482. <xsl:variable name="revdate" select="date"/>
  483. <xsl:variable name="revauthor" select="authorinitials|author"/>
  484. <xsl:variable name="revremark" select="revremark|revdescription"/>
  485. <fo:table-row>
  486. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  487. <fo:block>
  488. <xsl:if test="$revnumber">
  489. <xsl:call-template name="gentext">
  490. <xsl:with-param name="key" select="'Revision'"/>
  491. </xsl:call-template>
  492. <xsl:call-template name="gentext.space"/>
  493. <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
  494. </xsl:if>
  495. </fo:block>
  496. </fo:table-cell>
  497. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  498. <fo:block>
  499. <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
  500. </fo:block>
  501. </fo:table-cell>
  502. <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
  503. <fo:block>
  504. <xsl:for-each select="$revauthor">
  505. <xsl:apply-templates select="." mode="titlepage.mode"/>
  506. <xsl:if test="position() != last()">
  507. <xsl:text>, </xsl:text>
  508. </xsl:if>
  509. </xsl:for-each>
  510. </fo:block>
  511. </fo:table-cell>
  512. </fo:table-row>
  513. <xsl:if test="$revremark">
  514. <fo:table-row>
  515. <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
  516. <fo:block>
  517. <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
  518. </fo:block>
  519. </fo:table-cell>
  520. </fo:table-row>
  521. </xsl:if>
  522. </xsl:template>
  523. <xsl:template match="revision/revnumber" mode="titlepage.mode">
  524. <xsl:apply-templates mode="titlepage.mode"/>
  525. </xsl:template>
  526. <xsl:template match="revision/date" mode="titlepage.mode">
  527. <xsl:apply-templates mode="titlepage.mode"/>
  528. </xsl:template>
  529. <xsl:template match="revision/authorinitials" mode="titlepage.mode">
  530. <xsl:apply-templates mode="titlepage.mode"/>
  531. </xsl:template>
  532. <xsl:template match="revision/author" mode="titlepage.mode">
  533. <xsl:apply-templates mode="titlepage.mode"/>
  534. </xsl:template>
  535. <xsl:template match="revision/revremark" mode="titlepage.mode">
  536. <xsl:apply-templates mode="titlepage.mode"/>
  537. </xsl:template>
  538. <xsl:template match="revision/revdescription" mode="titlepage.mode">
  539. <xsl:apply-templates mode="titlepage.mode"/>
  540. </xsl:template>
  541. <xsl:template match="seriesvolnums" mode="titlepage.mode">
  542. <xsl:apply-templates mode="titlepage.mode"/>
  543. </xsl:template>
  544. <xsl:template match="shortaffil" mode="titlepage.mode">
  545. <xsl:apply-templates mode="titlepage.mode"/>
  546. </xsl:template>
  547. <xsl:template match="subjectset" mode="titlepage.mode">
  548. <!-- discard -->
  549. </xsl:template>
  550. <xsl:template match="subtitle" mode="titlepage.mode">
  551. <xsl:apply-templates mode="titlepage.mode"/>
  552. </xsl:template>
  553. <xsl:template match="surname" mode="titlepage.mode">
  554. <xsl:apply-templates mode="titlepage.mode"/>
  555. </xsl:template>
  556. <xsl:template match="title" mode="titlepage.mode">
  557. <xsl:apply-templates mode="titlepage.mode"/>
  558. </xsl:template>
  559. <xsl:template match="titleabbrev" mode="titlepage.mode">
  560. <xsl:apply-templates mode="titlepage.mode"/>
  561. </xsl:template>
  562. <xsl:template match="volumenum" mode="titlepage.mode">
  563. <xsl:apply-templates mode="titlepage.mode"/>
  564. </xsl:template>
  565. <!-- ==================================================================== -->
  566. <!-- Book templates -->
  567. <!-- Note: these templates cannot use *.titlepage.recto.mode or
  568. *.titlepage.verso.mode. If they do then subsequent use of a custom
  569. titlepage.templates.xml file will not work correctly. -->
  570. <!-- book recto -->
  571. <xsl:template match="bookinfo/authorgroup|book/info/authorgroup"
  572. mode="titlepage.mode" priority="2">
  573. <fo:block>
  574. <xsl:call-template name="anchor"/>
  575. <xsl:apply-templates mode="titlepage.mode"/>
  576. </fo:block>
  577. </xsl:template>
  578. <!-- book verso -->
  579. <xsl:template name="book.verso.title">
  580. <fo:block>
  581. <xsl:apply-templates mode="titlepage.mode"/>
  582. <xsl:if test="following-sibling::subtitle
  583. |following-sibling::info/subtitle
  584. |following-sibling::bookinfo/subtitle">
  585. <xsl:text>: </xsl:text>
  586. <xsl:apply-templates select="(following-sibling::subtitle
  587. |following-sibling::info/subtitle
  588. |following-sibling::bookinfo/subtitle)[1]"
  589. mode="book.verso.subtitle.mode"/>
  590. </xsl:if>
  591. </fo:block>
  592. </xsl:template>
  593. <xsl:template match="subtitle" mode="book.verso.subtitle.mode">
  594. <xsl:apply-templates mode="titlepage.mode"/>
  595. <xsl:if test="following-sibling::subtitle">
  596. <xsl:text>: </xsl:text>
  597. <xsl:apply-templates select="following-sibling::subtitle[1]"
  598. mode="book.verso.subtitle.mode"/>
  599. </xsl:if>
  600. </xsl:template>
  601. <xsl:template name="verso.authorgroup">
  602. <fo:block>
  603. <xsl:call-template name="gentext">
  604. <xsl:with-param name="key" select="'by'"/>
  605. </xsl:call-template>
  606. <xsl:text> </xsl:text>
  607. <xsl:call-template name="person.name.list">
  608. <xsl:with-param name="person.list" select="author|corpauthor|editor"/>
  609. </xsl:call-template>
  610. </fo:block>
  611. <xsl:apply-templates select="othercredit" mode="titlepage.mode"/>
  612. </xsl:template>
  613. <xsl:template match="bookinfo/author|book/info/author"
  614. mode="titlepage.mode" priority="2">
  615. <fo:block>
  616. <xsl:call-template name="person.name"/>
  617. </fo:block>
  618. </xsl:template>
  619. <xsl:template match="bookinfo/corpauthor|book/info/corpauthor"
  620. mode="titlepage.mode" priority="2">
  621. <fo:block>
  622. <xsl:apply-templates/>
  623. </fo:block>
  624. </xsl:template>
  625. <xsl:template match="bookinfo/pubdate|book/info/pubdate"
  626. mode="titlepage.mode" priority="2">
  627. <fo:block>
  628. <xsl:call-template name="gentext">
  629. <xsl:with-param name="key" select="'pubdate'"/>
  630. </xsl:call-template>
  631. <xsl:text> </xsl:text>
  632. <xsl:apply-templates mode="titlepage.mode"/>
  633. </fo:block>
  634. </xsl:template>
  635. <!-- ==================================================================== -->
  636. </xsl:stylesheet>