division.xsl 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  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. xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
  5. version='1.0'>
  6. <!-- ********************************************************************
  7. $Id: division.xsl 9730 2013-03-15 15:26:25Z bobstayton $
  8. ********************************************************************
  9. This file is part of the XSL DocBook Stylesheet distribution.
  10. See ../README or http://docbook.sf.net/release/xsl/current/ for
  11. copyright and other information.
  12. ******************************************************************** -->
  13. <!-- ==================================================================== -->
  14. <xsl:template name="division.title">
  15. <xsl:param name="node" select="."/>
  16. <xsl:variable name="id">
  17. <xsl:call-template name="object.id">
  18. <xsl:with-param name="object" select="$node"/>
  19. </xsl:call-template>
  20. </xsl:variable>
  21. <xsl:variable name="title">
  22. <xsl:apply-templates select="$node" mode="object.title.markup">
  23. <xsl:with-param name="allow-anchors" select="1"/>
  24. </xsl:apply-templates>
  25. </xsl:variable>
  26. <fo:block keep-with-next.within-column="always"
  27. hyphenate="false">
  28. <xsl:if test="$axf.extensions != 0">
  29. <xsl:attribute name="axf:outline-level">
  30. <xsl:choose>
  31. <xsl:when test="count($node/ancestor::*) > 0">
  32. <xsl:value-of select="count($node/ancestor::*)"/>
  33. </xsl:when>
  34. <xsl:otherwise>1</xsl:otherwise>
  35. </xsl:choose>
  36. </xsl:attribute>
  37. <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
  38. <xsl:attribute name="axf:outline-title">
  39. <xsl:value-of select="normalize-space($title)"/>
  40. </xsl:attribute>
  41. </xsl:if>
  42. <xsl:copy-of select="$title"/>
  43. </fo:block>
  44. </xsl:template>
  45. <!-- ==================================================================== -->
  46. <xsl:template match="set">
  47. <xsl:variable name="id">
  48. <xsl:call-template name="object.id"/>
  49. </xsl:variable>
  50. <xsl:variable name="preamble"
  51. select="*[not(self::book or self::set or self::setindex)]"/>
  52. <xsl:variable name="content" select="book|set|setindex"/>
  53. <xsl:variable name="titlepage-master-reference">
  54. <xsl:call-template name="select.pagemaster">
  55. <xsl:with-param name="pageclass" select="'titlepage'"/>
  56. </xsl:call-template>
  57. </xsl:variable>
  58. <xsl:variable name="lot-master-reference">
  59. <xsl:call-template name="select.pagemaster">
  60. <xsl:with-param name="pageclass" select="'lot'"/>
  61. </xsl:call-template>
  62. </xsl:variable>
  63. <xsl:if test="$preamble">
  64. <fo:page-sequence hyphenate="{$hyphenate}"
  65. master-reference="{$titlepage-master-reference}">
  66. <xsl:attribute name="language">
  67. <xsl:call-template name="l10n.language"/>
  68. </xsl:attribute>
  69. <xsl:attribute name="format">
  70. <xsl:call-template name="page.number.format">
  71. <xsl:with-param name="master-reference"
  72. select="$titlepage-master-reference"/>
  73. </xsl:call-template>
  74. </xsl:attribute>
  75. <xsl:attribute name="initial-page-number">
  76. <xsl:call-template name="initial.page.number">
  77. <xsl:with-param name="master-reference"
  78. select="$titlepage-master-reference"/>
  79. </xsl:call-template>
  80. </xsl:attribute>
  81. <xsl:attribute name="force-page-count">
  82. <xsl:call-template name="force.page.count">
  83. <xsl:with-param name="master-reference"
  84. select="$titlepage-master-reference"/>
  85. </xsl:call-template>
  86. </xsl:attribute>
  87. <xsl:attribute name="hyphenation-character">
  88. <xsl:call-template name="gentext">
  89. <xsl:with-param name="key" select="'hyphenation-character'"/>
  90. </xsl:call-template>
  91. </xsl:attribute>
  92. <xsl:attribute name="hyphenation-push-character-count">
  93. <xsl:call-template name="gentext">
  94. <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
  95. </xsl:call-template>
  96. </xsl:attribute>
  97. <xsl:attribute name="hyphenation-remain-character-count">
  98. <xsl:call-template name="gentext">
  99. <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
  100. </xsl:call-template>
  101. </xsl:attribute>
  102. <xsl:apply-templates select="." mode="running.head.mode">
  103. <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
  104. </xsl:apply-templates>
  105. <xsl:apply-templates select="." mode="running.foot.mode">
  106. <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
  107. </xsl:apply-templates>
  108. <fo:flow flow-name="xsl-region-body">
  109. <xsl:call-template name="set.flow.properties">
  110. <xsl:with-param name="element" select="local-name(.)"/>
  111. <xsl:with-param name="master-reference"
  112. select="$titlepage-master-reference"/>
  113. </xsl:call-template>
  114. <fo:block id="{$id}">
  115. <xsl:call-template name="set.titlepage"/>
  116. </fo:block>
  117. </fo:flow>
  118. </fo:page-sequence>
  119. </xsl:if>
  120. <xsl:variable name="toc.params">
  121. <xsl:call-template name="find.path.params">
  122. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  123. </xsl:call-template>
  124. </xsl:variable>
  125. <xsl:if test="contains($toc.params, 'toc')">
  126. <fo:page-sequence hyphenate="{$hyphenate}"
  127. master-reference="{$lot-master-reference}">
  128. <xsl:attribute name="language">
  129. <xsl:call-template name="l10n.language"/>
  130. </xsl:attribute>
  131. <xsl:attribute name="format">
  132. <xsl:call-template name="page.number.format">
  133. <xsl:with-param name="element" select="'toc'"/>
  134. <xsl:with-param name="master-reference"
  135. select="$lot-master-reference"/>
  136. </xsl:call-template>
  137. </xsl:attribute>
  138. <xsl:attribute name="initial-page-number">
  139. <xsl:call-template name="initial.page.number">
  140. <xsl:with-param name="master-reference"
  141. select="$lot-master-reference"/>
  142. </xsl:call-template>
  143. </xsl:attribute>
  144. <xsl:attribute name="force-page-count">
  145. <xsl:call-template name="force.page.count">
  146. <xsl:with-param name="master-reference"
  147. select="$lot-master-reference"/>
  148. </xsl:call-template>
  149. </xsl:attribute>
  150. <xsl:attribute name="hyphenation-character">
  151. <xsl:call-template name="gentext">
  152. <xsl:with-param name="key" select="'hyphenation-character'"/>
  153. </xsl:call-template>
  154. </xsl:attribute>
  155. <xsl:attribute name="hyphenation-push-character-count">
  156. <xsl:call-template name="gentext">
  157. <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
  158. </xsl:call-template>
  159. </xsl:attribute>
  160. <xsl:attribute name="hyphenation-remain-character-count">
  161. <xsl:call-template name="gentext">
  162. <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
  163. </xsl:call-template>
  164. </xsl:attribute>
  165. <xsl:apply-templates select="." mode="running.head.mode">
  166. <xsl:with-param name="master-reference" select="$lot-master-reference"/>
  167. </xsl:apply-templates>
  168. <xsl:apply-templates select="." mode="running.foot.mode">
  169. <xsl:with-param name="master-reference" select="$lot-master-reference"/>
  170. </xsl:apply-templates>
  171. <fo:flow flow-name="xsl-region-body">
  172. <xsl:call-template name="set.flow.properties">
  173. <xsl:with-param name="element" select="local-name(.)"/>
  174. <xsl:with-param name="master-reference"
  175. select="$lot-master-reference"/>
  176. </xsl:call-template>
  177. <xsl:call-template name="set.toc"/>
  178. </fo:flow>
  179. </fo:page-sequence>
  180. </xsl:if>
  181. <xsl:apply-templates select="$content"/>
  182. </xsl:template>
  183. <xsl:template match="set/setinfo"></xsl:template>
  184. <xsl:template match="set/title"></xsl:template>
  185. <xsl:template match="set/subtitle"></xsl:template>
  186. <xsl:template match="set/titleabbrev"></xsl:template>
  187. <!-- ==================================================================== -->
  188. <xsl:template match="book">
  189. <xsl:variable name="id">
  190. <xsl:call-template name="object.id"/>
  191. </xsl:variable>
  192. <xsl:variable name="preamble"
  193. select="title|subtitle|titleabbrev|bookinfo|info"/>
  194. <xsl:variable name="content"
  195. select="node()[not(self::title or self::subtitle
  196. or self::titleabbrev
  197. or self::info
  198. or self::bookinfo)]"/>
  199. <xsl:variable name="titlepage-master-reference">
  200. <xsl:call-template name="select.pagemaster">
  201. <xsl:with-param name="pageclass" select="'titlepage'"/>
  202. </xsl:call-template>
  203. </xsl:variable>
  204. <xsl:call-template name="front.cover"/>
  205. <xsl:if test="$preamble">
  206. <xsl:call-template name="page.sequence">
  207. <xsl:with-param name="master-reference"
  208. select="$titlepage-master-reference"/>
  209. <xsl:with-param name="content">
  210. <fo:block id="{$id}">
  211. <xsl:call-template name="book.titlepage"/>
  212. </fo:block>
  213. </xsl:with-param>
  214. </xsl:call-template>
  215. </xsl:if>
  216. <xsl:apply-templates select="dedication" mode="dedication"/>
  217. <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
  218. <xsl:call-template name="make.book.tocs"/>
  219. <xsl:apply-templates select="$content"/>
  220. <xsl:call-template name="back.cover"/>
  221. </xsl:template>
  222. <xsl:template match="book/bookinfo"></xsl:template>
  223. <xsl:template match="book/info"></xsl:template>
  224. <xsl:template match="book/title"></xsl:template>
  225. <xsl:template match="book/subtitle"></xsl:template>
  226. <xsl:template match="book/titleabbrev"></xsl:template>
  227. <!-- Placeholder templates -->
  228. <xsl:template name="front.cover"/>
  229. <xsl:template name="back.cover"/>
  230. <!-- ================================================================= -->
  231. <xsl:template name="make.book.tocs">
  232. <xsl:variable name="lot-master-reference">
  233. <xsl:call-template name="select.pagemaster">
  234. <xsl:with-param name="pageclass" select="'lot'"/>
  235. </xsl:call-template>
  236. </xsl:variable>
  237. <xsl:variable name="toc.params">
  238. <xsl:call-template name="find.path.params">
  239. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  240. </xsl:call-template>
  241. </xsl:variable>
  242. <xsl:if test="contains($toc.params, 'toc')">
  243. <xsl:call-template name="page.sequence">
  244. <xsl:with-param name="master-reference"
  245. select="$lot-master-reference"/>
  246. <xsl:with-param name="element" select="'toc'"/>
  247. <xsl:with-param name="gentext-key" select="'TableofContents'"/>
  248. <xsl:with-param name="content">
  249. <xsl:call-template name="division.toc">
  250. <xsl:with-param name="toc.title.p"
  251. select="contains($toc.params, 'title')"/>
  252. </xsl:call-template>
  253. </xsl:with-param>
  254. </xsl:call-template>
  255. </xsl:if>
  256. <xsl:if test="contains($toc.params,'figure') and .//figure">
  257. <xsl:call-template name="page.sequence">
  258. <xsl:with-param name="master-reference"
  259. select="$lot-master-reference"/>
  260. <xsl:with-param name="element" select="'toc'"/>
  261. <xsl:with-param name="gentext-key" select="'ListofFigures'"/>
  262. <xsl:with-param name="content">
  263. <xsl:call-template name="list.of.titles">
  264. <xsl:with-param name="titles" select="'figure'"/>
  265. <xsl:with-param name="nodes" select=".//figure"/>
  266. </xsl:call-template>
  267. </xsl:with-param>
  268. </xsl:call-template>
  269. </xsl:if>
  270. <xsl:if test="contains($toc.params,'table') and .//table">
  271. <xsl:call-template name="page.sequence">
  272. <xsl:with-param name="master-reference"
  273. select="$lot-master-reference"/>
  274. <xsl:with-param name="element" select="'toc'"/>
  275. <xsl:with-param name="gentext-key" select="'ListofTables'"/>
  276. <xsl:with-param name="content">
  277. <xsl:call-template name="list.of.titles">
  278. <xsl:with-param name="titles" select="'table'"/>
  279. <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
  280. </xsl:call-template>
  281. </xsl:with-param>
  282. </xsl:call-template>
  283. </xsl:if>
  284. <xsl:if test="contains($toc.params,'example') and .//example">
  285. <xsl:call-template name="page.sequence">
  286. <xsl:with-param name="master-reference"
  287. select="$lot-master-reference"/>
  288. <xsl:with-param name="element" select="'toc'"/>
  289. <xsl:with-param name="gentext-key" select="'ListofExample'"/>
  290. <xsl:with-param name="content">
  291. <xsl:call-template name="list.of.titles">
  292. <xsl:with-param name="titles" select="'example'"/>
  293. <xsl:with-param name="nodes" select=".//example"/>
  294. </xsl:call-template>
  295. </xsl:with-param>
  296. </xsl:call-template>
  297. </xsl:if>
  298. <xsl:if test="contains($toc.params,'equation') and
  299. .//equation[title or info/title]">
  300. <xsl:call-template name="page.sequence">
  301. <xsl:with-param name="master-reference"
  302. select="$lot-master-reference"/>
  303. <xsl:with-param name="element" select="'toc'"/>
  304. <xsl:with-param name="gentext-key" select="'ListofEquations'"/>
  305. <xsl:with-param name="content">
  306. <xsl:call-template name="list.of.titles">
  307. <xsl:with-param name="titles" select="'equation'"/>
  308. <xsl:with-param name="nodes"
  309. select=".//equation[title or info/title]"/>
  310. </xsl:call-template>
  311. </xsl:with-param>
  312. </xsl:call-template>
  313. </xsl:if>
  314. <xsl:if test="contains($toc.params,'procedure') and
  315. .//procedure[title or info/title]">
  316. <xsl:call-template name="page.sequence">
  317. <xsl:with-param name="master-reference"
  318. select="$lot-master-reference"/>
  319. <xsl:with-param name="element" select="'toc'"/>
  320. <xsl:with-param name="gentext-key" select="'ListofProcedures'"/>
  321. <xsl:with-param name="content">
  322. <xsl:call-template name="list.of.titles">
  323. <xsl:with-param name="titles" select="'procedure'"/>
  324. <xsl:with-param name="nodes"
  325. select=".//procedure[title or info/title]"/>
  326. </xsl:call-template>
  327. </xsl:with-param>
  328. </xsl:call-template>
  329. </xsl:if>
  330. </xsl:template>
  331. <!-- ==================================================================== -->
  332. <xsl:template match="part">
  333. <xsl:if test="not(partintro)">
  334. <xsl:apply-templates select="." mode="part.titlepage.mode"/>
  335. <xsl:call-template name="generate.part.toc"/>
  336. </xsl:if>
  337. <xsl:apply-templates/>
  338. </xsl:template>
  339. <xsl:template match="part" mode="part.titlepage.mode">
  340. <!-- done this way to force the context node to be the part -->
  341. <xsl:param name="additional.content"/>
  342. <xsl:variable name="id">
  343. <xsl:call-template name="object.id"/>
  344. </xsl:variable>
  345. <xsl:variable name="titlepage-master-reference">
  346. <xsl:call-template name="select.pagemaster">
  347. <xsl:with-param name="pageclass" select="'titlepage'"/>
  348. </xsl:call-template>
  349. </xsl:variable>
  350. <fo:page-sequence hyphenate="{$hyphenate}"
  351. master-reference="{$titlepage-master-reference}">
  352. <xsl:attribute name="language">
  353. <xsl:call-template name="l10n.language"/>
  354. </xsl:attribute>
  355. <xsl:attribute name="format">
  356. <xsl:call-template name="page.number.format">
  357. <xsl:with-param name="master-reference"
  358. select="$titlepage-master-reference"/>
  359. </xsl:call-template>
  360. </xsl:attribute>
  361. <xsl:attribute name="initial-page-number">
  362. <xsl:call-template name="initial.page.number">
  363. <xsl:with-param name="master-reference"
  364. select="$titlepage-master-reference"/>
  365. </xsl:call-template>
  366. </xsl:attribute>
  367. <xsl:attribute name="force-page-count">
  368. <xsl:call-template name="force.page.count">
  369. <xsl:with-param name="master-reference"
  370. select="$titlepage-master-reference"/>
  371. </xsl:call-template>
  372. </xsl:attribute>
  373. <xsl:attribute name="hyphenation-character">
  374. <xsl:call-template name="gentext">
  375. <xsl:with-param name="key" select="'hyphenation-character'"/>
  376. </xsl:call-template>
  377. </xsl:attribute>
  378. <xsl:attribute name="hyphenation-push-character-count">
  379. <xsl:call-template name="gentext">
  380. <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
  381. </xsl:call-template>
  382. </xsl:attribute>
  383. <xsl:attribute name="hyphenation-remain-character-count">
  384. <xsl:call-template name="gentext">
  385. <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
  386. </xsl:call-template>
  387. </xsl:attribute>
  388. <xsl:apply-templates select="." mode="running.head.mode">
  389. <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
  390. </xsl:apply-templates>
  391. <xsl:apply-templates select="." mode="running.foot.mode">
  392. <xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
  393. </xsl:apply-templates>
  394. <fo:flow flow-name="xsl-region-body">
  395. <xsl:call-template name="set.flow.properties">
  396. <xsl:with-param name="element" select="local-name(.)"/>
  397. <xsl:with-param name="master-reference"
  398. select="$titlepage-master-reference"/>
  399. </xsl:call-template>
  400. <fo:block id="{$id}">
  401. <xsl:call-template name="part.titlepage"/>
  402. </fo:block>
  403. <xsl:copy-of select="$additional.content"/>
  404. </fo:flow>
  405. </fo:page-sequence>
  406. </xsl:template>
  407. <xsl:template match="part/docinfo|partinfo"></xsl:template>
  408. <xsl:template match="part/info"></xsl:template>
  409. <xsl:template match="part/title"></xsl:template>
  410. <xsl:template match="part/subtitle"></xsl:template>
  411. <xsl:template match="part/titleabbrev"></xsl:template>
  412. <!-- ==================================================================== -->
  413. <xsl:template name="generate.part.toc">
  414. <xsl:param name="part" select="."/>
  415. <xsl:variable name="lot-master-reference">
  416. <xsl:call-template name="select.pagemaster">
  417. <xsl:with-param name="pageclass" select="'lot'"/>
  418. </xsl:call-template>
  419. </xsl:variable>
  420. <xsl:variable name="toc.params">
  421. <xsl:call-template name="find.path.params">
  422. <xsl:with-param name="node" select="$part"/>
  423. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  424. </xsl:call-template>
  425. </xsl:variable>
  426. <xsl:variable name="nodes" select="$part/reference|
  427. $part/preface|
  428. $part/chapter|
  429. $part/appendix|
  430. $part/article|
  431. $part/bibliography|
  432. $part/glossary|
  433. $part/index"/>
  434. <xsl:if test="count($nodes) &gt; 0 and contains($toc.params, 'toc')">
  435. <fo:page-sequence hyphenate="{$hyphenate}"
  436. master-reference="{$lot-master-reference}">
  437. <xsl:attribute name="language">
  438. <xsl:call-template name="l10n.language"/>
  439. </xsl:attribute>
  440. <xsl:attribute name="format">
  441. <xsl:call-template name="page.number.format">
  442. <xsl:with-param name="element" select="'toc'"/>
  443. <xsl:with-param name="master-reference"
  444. select="$lot-master-reference"/>
  445. </xsl:call-template>
  446. </xsl:attribute>
  447. <xsl:attribute name="initial-page-number">
  448. <xsl:call-template name="initial.page.number">
  449. <xsl:with-param name="element" select="'toc'"/>
  450. <xsl:with-param name="master-reference"
  451. select="$lot-master-reference"/>
  452. </xsl:call-template>
  453. </xsl:attribute>
  454. <xsl:attribute name="force-page-count">
  455. <xsl:call-template name="force.page.count">
  456. <xsl:with-param name="master-reference"
  457. select="$lot-master-reference"/>
  458. </xsl:call-template>
  459. </xsl:attribute>
  460. <xsl:attribute name="hyphenation-character">
  461. <xsl:call-template name="gentext">
  462. <xsl:with-param name="key" select="'hyphenation-character'"/>
  463. </xsl:call-template>
  464. </xsl:attribute>
  465. <xsl:attribute name="hyphenation-push-character-count">
  466. <xsl:call-template name="gentext">
  467. <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
  468. </xsl:call-template>
  469. </xsl:attribute>
  470. <xsl:attribute name="hyphenation-remain-character-count">
  471. <xsl:call-template name="gentext">
  472. <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
  473. </xsl:call-template>
  474. </xsl:attribute>
  475. <xsl:apply-templates select="$part" mode="running.head.mode">
  476. <xsl:with-param name="master-reference" select="$lot-master-reference"/>
  477. </xsl:apply-templates>
  478. <xsl:apply-templates select="$part" mode="running.foot.mode">
  479. <xsl:with-param name="master-reference" select="$lot-master-reference"/>
  480. </xsl:apply-templates>
  481. <fo:flow flow-name="xsl-region-body">
  482. <xsl:call-template name="set.flow.properties">
  483. <xsl:with-param name="element" select="local-name(.)"/>
  484. <xsl:with-param name="master-reference"
  485. select="$lot-master-reference"/>
  486. </xsl:call-template>
  487. <xsl:call-template name="division.toc">
  488. <xsl:with-param name="toc-context" select="$part"/>
  489. <xsl:with-param name="toc.title.p"
  490. select="contains($toc.params, 'title')"/>
  491. </xsl:call-template>
  492. </fo:flow>
  493. </fo:page-sequence>
  494. </xsl:if>
  495. </xsl:template>
  496. <!-- ==================================================================== -->
  497. <xsl:template match="part/partintro">
  498. <xsl:apply-templates select=".." mode="part.titlepage.mode">
  499. <xsl:with-param name="additional.content">
  500. <xsl:if test="title">
  501. <xsl:call-template name="partintro.titlepage"/>
  502. </xsl:if>
  503. <xsl:apply-templates/>
  504. </xsl:with-param>
  505. </xsl:apply-templates>
  506. <xsl:call-template name="generate.part.toc">
  507. <xsl:with-param name="part" select=".."/>
  508. </xsl:call-template>
  509. </xsl:template>
  510. <xsl:template match="partintro/title"></xsl:template>
  511. <xsl:template match="partintro/subtitle"></xsl:template>
  512. <xsl:template match="partintro/titleabbrev"></xsl:template>
  513. <!-- ==================================================================== -->
  514. <xsl:template match="book" mode="division.number">
  515. <xsl:number from="set" count="book" format="1."/>
  516. </xsl:template>
  517. <xsl:template match="part" mode="division.number">
  518. <xsl:number from="book" count="part" format="I."/>
  519. </xsl:template>
  520. </xsl:stylesheet>