division.xsl 23 KB

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