titlepage.xsl 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. version='1.0'>
  4. <!-- ********************************************************************
  5. $Id: titlepage.xsl 9360 2012-05-12 23:39:14Z bobstayton $
  6. ********************************************************************
  7. This file is part of the XSL DocBook Stylesheet distribution.
  8. See ../README or http://docbook.sf.net/release/xsl/current/ for
  9. copyright and other information.
  10. ******************************************************************** -->
  11. <!-- ==================================================================== -->
  12. <xsl:attribute-set name="book.titlepage.recto.style"/>
  13. <xsl:attribute-set name="book.titlepage.verso.style"/>
  14. <xsl:attribute-set name="article.titlepage.recto.style"/>
  15. <xsl:attribute-set name="article.titlepage.verso.style"/>
  16. <xsl:attribute-set name="set.titlepage.recto.style"/>
  17. <xsl:attribute-set name="set.titlepage.verso.style"/>
  18. <xsl:attribute-set name="part.titlepage.recto.style"/>
  19. <xsl:attribute-set name="part.titlepage.verso.style"/>
  20. <xsl:attribute-set name="partintro.titlepage.recto.style"/>
  21. <xsl:attribute-set name="partintro.titlepage.verso.style"/>
  22. <xsl:attribute-set name="reference.titlepage.recto.style"/>
  23. <xsl:attribute-set name="reference.titlepage.verso.style"/>
  24. <xsl:attribute-set name="refentry.titlepage.recto.style"/>
  25. <xsl:attribute-set name="refentry.titlepage.verso.style"/>
  26. <xsl:attribute-set name="dedication.titlepage.recto.style"/>
  27. <xsl:attribute-set name="dedication.titlepage.verso.style"/>
  28. <xsl:attribute-set name="acknowledgements.titlepage.recto.style"/>
  29. <xsl:attribute-set name="acknowledgements.titlepage.verso.style"/>
  30. <xsl:attribute-set name="preface.titlepage.recto.style"/>
  31. <xsl:attribute-set name="preface.titlepage.verso.style"/>
  32. <xsl:attribute-set name="chapter.titlepage.recto.style"/>
  33. <xsl:attribute-set name="chapter.titlepage.verso.style"/>
  34. <xsl:attribute-set name="appendix.titlepage.recto.style"/>
  35. <xsl:attribute-set name="appendix.titlepage.verso.style"/>
  36. <xsl:attribute-set name="bibliography.titlepage.recto.style"/>
  37. <xsl:attribute-set name="bibliography.titlepage.verso.style"/>
  38. <xsl:attribute-set name="glossary.titlepage.recto.style"/>
  39. <xsl:attribute-set name="glossary.titlepage.verso.style"/>
  40. <xsl:attribute-set name="index.titlepage.recto.style"/>
  41. <xsl:attribute-set name="index.titlepage.verso.style"/>
  42. <xsl:attribute-set name="setindex.titlepage.recto.style"/>
  43. <xsl:attribute-set name="setindex.titlepage.verso.style"/>
  44. <xsl:attribute-set name="sidebar.titlepage.recto.style"/>
  45. <xsl:attribute-set name="sidebar.titlepage.verso.style"/>
  46. <xsl:attribute-set name="topic.titlepage.recto.style"/>
  47. <xsl:attribute-set name="topic.titlepage.verso.style"/>
  48. <xsl:attribute-set name="section.titlepage.recto.style"/>
  49. <xsl:attribute-set name="section.titlepage.verso.style"/>
  50. <xsl:attribute-set name="sect1.titlepage.recto.style"
  51. use-attribute-sets="section.titlepage.recto.style"/>
  52. <xsl:attribute-set name="sect1.titlepage.verso.style"
  53. use-attribute-sets="section.titlepage.verso.style"/>
  54. <xsl:attribute-set name="sect2.titlepage.recto.style"
  55. use-attribute-sets="section.titlepage.recto.style"/>
  56. <xsl:attribute-set name="sect2.titlepage.verso.style"
  57. use-attribute-sets="section.titlepage.verso.style"/>
  58. <xsl:attribute-set name="sect3.titlepage.recto.style"
  59. use-attribute-sets="section.titlepage.recto.style"/>
  60. <xsl:attribute-set name="sect3.titlepage.verso.style"
  61. use-attribute-sets="section.titlepage.verso.style"/>
  62. <xsl:attribute-set name="sect4.titlepage.recto.style"
  63. use-attribute-sets="section.titlepage.recto.style"/>
  64. <xsl:attribute-set name="sect4.titlepage.verso.style"
  65. use-attribute-sets="section.titlepage.verso.style"/>
  66. <xsl:attribute-set name="sect5.titlepage.recto.style"
  67. use-attribute-sets="section.titlepage.recto.style"/>
  68. <xsl:attribute-set name="sect5.titlepage.verso.style"
  69. use-attribute-sets="section.titlepage.verso.style"/>
  70. <xsl:attribute-set name="simplesect.titlepage.recto.style"
  71. use-attribute-sets="section.titlepage.recto.style"/>
  72. <xsl:attribute-set name="simplesect.titlepage.verso.style"
  73. use-attribute-sets="section.titlepage.verso.style"/>
  74. <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
  75. <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
  76. <xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
  77. <xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
  78. <xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
  79. <xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
  80. <xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
  81. <xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
  82. <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
  83. <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
  84. <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
  85. <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
  86. <!-- ==================================================================== -->
  87. <xsl:template match="*" mode="titlepage.mode">
  88. <!-- if an element isn't found in this mode, try the default mode -->
  89. <xsl:apply-templates select="."/>
  90. </xsl:template>
  91. <xsl:template match="abbrev" mode="titlepage.mode">
  92. <span>
  93. <xsl:apply-templates select="." mode="common.html.attributes"/>
  94. <xsl:call-template name="id.attribute"/>
  95. <xsl:apply-templates mode="titlepage.mode"/>
  96. <br/>
  97. </span>
  98. </xsl:template>
  99. <xsl:template match="abstract" mode="titlepage.mode">
  100. <div>
  101. <xsl:apply-templates select="." mode="common.html.attributes"/>
  102. <xsl:call-template name="id.attribute"/>
  103. <xsl:call-template name="anchor"/>
  104. <xsl:if test="$abstract.notitle.enabled = 0">
  105. <xsl:call-template name="formal.object.heading">
  106. <xsl:with-param name="title">
  107. <xsl:apply-templates select="." mode="title.markup"/>
  108. </xsl:with-param>
  109. </xsl:call-template>
  110. </xsl:if>
  111. <xsl:apply-templates mode="titlepage.mode"/>
  112. <xsl:call-template name="process.footnotes"/>
  113. </div>
  114. </xsl:template>
  115. <xsl:template match="abstract/title" mode="titlepage.mode">
  116. </xsl:template>
  117. <xsl:template match="address" mode="titlepage.mode">
  118. <xsl:param name="suppress-numbers" select="'0'"/>
  119. <xsl:variable name="rtf">
  120. <xsl:apply-templates mode="titlepage.mode"/>
  121. </xsl:variable>
  122. <xsl:choose>
  123. <xsl:when test="$suppress-numbers = '0'
  124. and @linenumbering = 'numbered'
  125. and $use.extensions != '0'
  126. and $linenumbering.extension != '0'">
  127. <div>
  128. <xsl:apply-templates select="." mode="common.html.attributes"/>
  129. <xsl:call-template name="paragraph">
  130. <xsl:with-param name="content">
  131. <xsl:call-template name="number.rtf.lines">
  132. <xsl:with-param name="rtf" select="$rtf"/>
  133. </xsl:call-template>
  134. </xsl:with-param>
  135. </xsl:call-template>
  136. </div>
  137. </xsl:when>
  138. <xsl:otherwise>
  139. <div>
  140. <xsl:apply-templates select="." mode="common.html.attributes"/>
  141. <xsl:call-template name="paragraph">
  142. <xsl:with-param name="content">
  143. <xsl:call-template name="make-verbatim">
  144. <xsl:with-param name="rtf" select="$rtf"/>
  145. </xsl:call-template>
  146. </xsl:with-param>
  147. </xsl:call-template>
  148. </div>
  149. </xsl:otherwise>
  150. </xsl:choose>
  151. </xsl:template>
  152. <xsl:template match="affiliation" mode="titlepage.mode">
  153. <div>
  154. <xsl:apply-templates select="." mode="common.html.attributes"/>
  155. <xsl:call-template name="id.attribute"/>
  156. <xsl:apply-templates mode="titlepage.mode"/>
  157. </div>
  158. </xsl:template>
  159. <xsl:template match="artpagenums" mode="titlepage.mode">
  160. <span>
  161. <xsl:apply-templates select="." mode="common.html.attributes"/>
  162. <xsl:call-template name="id.attribute"/>
  163. <xsl:apply-templates mode="titlepage.mode"/>
  164. <br/>
  165. </span>
  166. </xsl:template>
  167. <xsl:template match="author|editor" mode="titlepage.mode">
  168. <xsl:call-template name="credits.div"/>
  169. </xsl:template>
  170. <xsl:template name="credits.div">
  171. <div>
  172. <xsl:apply-templates select="." mode="common.html.attributes"/>
  173. <xsl:call-template name="id.attribute"/>
  174. <xsl:if test="self::editor[position()=1] and not($editedby.enabled = 0)">
  175. <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
  176. </xsl:if>
  177. <h3>
  178. <xsl:apply-templates select="." mode="common.html.attributes"/>
  179. <xsl:choose>
  180. <xsl:when test="orgname">
  181. <xsl:apply-templates/>
  182. </xsl:when>
  183. <xsl:otherwise>
  184. <xsl:call-template name="person.name"/>
  185. </xsl:otherwise>
  186. </xsl:choose>
  187. </h3>
  188. <xsl:if test="not($contrib.inline.enabled = 0)">
  189. <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
  190. </xsl:if>
  191. <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
  192. <xsl:apply-templates mode="titlepage.mode" select="email"/>
  193. <xsl:if test="not($blurb.on.titlepage.enabled = 0)">
  194. <xsl:choose>
  195. <xsl:when test="$contrib.inline.enabled = 0">
  196. <xsl:apply-templates mode="titlepage.mode"
  197. select="contrib|authorblurb|personblurb"/>
  198. </xsl:when>
  199. <xsl:otherwise>
  200. <xsl:apply-templates mode="titlepage.mode"
  201. select="authorblurb|personblurb"/>
  202. </xsl:otherwise>
  203. </xsl:choose>
  204. </xsl:if>
  205. </div>
  206. </xsl:template>
  207. <xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
  208. <div>
  209. <xsl:apply-templates select="." mode="common.html.attributes"/>
  210. <xsl:call-template name="id.attribute"/>
  211. <xsl:apply-templates mode="titlepage.mode"/>
  212. </div>
  213. </xsl:template>
  214. <xsl:template match="authorgroup" mode="titlepage.mode">
  215. <div>
  216. <xsl:apply-templates select="." mode="common.html.attributes"/>
  217. <xsl:call-template name="id.attribute"/>
  218. <xsl:if test="parent::refentryinfo">
  219. <h2>Authors</h2>
  220. </xsl:if>
  221. <xsl:call-template name="anchor"/>
  222. <xsl:apply-templates mode="titlepage.mode"/>
  223. </div>
  224. </xsl:template>
  225. <xsl:template match="authorinitials" mode="titlepage.mode">
  226. <span>
  227. <xsl:apply-templates select="." mode="common.html.attributes"/>
  228. <xsl:call-template name="id.attribute"/>
  229. <xsl:apply-templates mode="titlepage.mode"/>
  230. <br/>
  231. </span>
  232. </xsl:template>
  233. <xsl:template match="bibliomisc" mode="titlepage.mode">
  234. <xsl:apply-templates mode="titlepage.mode"/>
  235. </xsl:template>
  236. <xsl:template match="bibliomset" mode="titlepage.mode">
  237. <xsl:apply-templates mode="titlepage.mode"/>
  238. </xsl:template>
  239. <xsl:template match="collab" mode="titlepage.mode">
  240. <span>
  241. <xsl:apply-templates select="." mode="common.html.attributes"/>
  242. <xsl:call-template name="id.attribute"/>
  243. <xsl:apply-templates mode="titlepage.mode"/>
  244. <br/>
  245. </span>
  246. </xsl:template>
  247. <xsl:template match="collabname" mode="titlepage.mode">
  248. <span>
  249. <xsl:apply-templates select="." mode="common.html.attributes"/>
  250. <xsl:call-template name="id.attribute"/>
  251. <xsl:apply-templates mode="titlepage.mode"/>
  252. </span>
  253. </xsl:template>
  254. <xsl:template match="confgroup" mode="titlepage.mode">
  255. <div>
  256. <xsl:apply-templates select="." mode="common.html.attributes"/>
  257. <xsl:call-template name="id.attribute"/>
  258. <xsl:apply-templates mode="titlepage.mode"/>
  259. </div>
  260. </xsl:template>
  261. <xsl:template match="confdates" mode="titlepage.mode">
  262. <span>
  263. <xsl:apply-templates select="." mode="common.html.attributes"/>
  264. <xsl:call-template name="id.attribute"/>
  265. <xsl:apply-templates mode="titlepage.mode"/>
  266. <br/>
  267. </span>
  268. </xsl:template>
  269. <xsl:template match="confsponsor" mode="titlepage.mode">
  270. <span>
  271. <xsl:apply-templates select="." mode="common.html.attributes"/>
  272. <xsl:call-template name="id.attribute"/>
  273. <xsl:apply-templates mode="titlepage.mode"/>
  274. <br/>
  275. </span>
  276. </xsl:template>
  277. <xsl:template match="conftitle" mode="titlepage.mode">
  278. <span>
  279. <xsl:apply-templates select="." mode="common.html.attributes"/>
  280. <xsl:call-template name="id.attribute"/>
  281. <xsl:apply-templates mode="titlepage.mode"/>
  282. <br/>
  283. </span>
  284. </xsl:template>
  285. <xsl:template match="confnum" mode="titlepage.mode">
  286. <!-- suppress -->
  287. </xsl:template>
  288. <xsl:template match="contractnum" mode="titlepage.mode">
  289. <span>
  290. <xsl:apply-templates select="." mode="common.html.attributes"/>
  291. <xsl:call-template name="id.attribute"/>
  292. <xsl:apply-templates mode="titlepage.mode"/>
  293. <br/>
  294. </span>
  295. </xsl:template>
  296. <xsl:template match="contractsponsor" mode="titlepage.mode">
  297. <span>
  298. <xsl:apply-templates select="." mode="common.html.attributes"/>
  299. <xsl:call-template name="id.attribute"/>
  300. <xsl:apply-templates mode="titlepage.mode"/>
  301. <br/>
  302. </span>
  303. </xsl:template>
  304. <xsl:template match="contrib" mode="titlepage.mode">
  305. <xsl:choose>
  306. <xsl:when test="not($contrib.inline.enabled = 0)">
  307. <span>
  308. <xsl:apply-templates select="." mode="common.html.attributes"/>
  309. <xsl:call-template name="id.attribute"/>
  310. <xsl:apply-templates mode="titlepage.mode"/>
  311. </span><xsl:text>&#160;</xsl:text>
  312. </xsl:when>
  313. <xsl:otherwise>
  314. <div>
  315. <xsl:apply-templates select="." mode="common.html.attributes"/>
  316. <xsl:call-template name="id.attribute"/>
  317. <p><xsl:apply-templates mode="titlepage.mode"/></p>
  318. </div>
  319. </xsl:otherwise>
  320. </xsl:choose>
  321. </xsl:template>
  322. <xsl:template match="copyright" mode="titlepage.mode">
  323. <xsl:if test="generate-id() = generate-id(//refentryinfo/copyright[1])
  324. and ($stylesheet.result.type = 'html' or $stylesheet.result.type = 'xhtml')">
  325. <h2>Copyright</h2>
  326. </xsl:if>
  327. <p>
  328. <xsl:apply-templates select="." mode="common.html.attributes"/>
  329. <xsl:call-template name="id.attribute"/>
  330. <xsl:call-template name="gentext">
  331. <xsl:with-param name="key" select="'Copyright'"/>
  332. </xsl:call-template>
  333. <xsl:call-template name="gentext.space"/>
  334. <xsl:call-template name="dingbat">
  335. <xsl:with-param name="dingbat">copyright</xsl:with-param>
  336. </xsl:call-template>
  337. <xsl:call-template name="gentext.space"/>
  338. <xsl:call-template name="copyright.years">
  339. <xsl:with-param name="years" select="year"/>
  340. <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
  341. <xsl:with-param name="single.year.ranges"
  342. select="$make.single.year.ranges"/>
  343. </xsl:call-template>
  344. <xsl:call-template name="gentext.space"/>
  345. <xsl:apply-templates select="holder" mode="titlepage.mode"/>
  346. </p>
  347. </xsl:template>
  348. <xsl:template match="year" mode="titlepage.mode">
  349. <xsl:choose>
  350. <xsl:when test="$show.revisionflag != 0 and @revisionflag">
  351. <span class="{@revisionflag}">
  352. <xsl:apply-templates mode="titlepage.mode"/>
  353. </span>
  354. </xsl:when>
  355. <xsl:otherwise>
  356. <xsl:apply-templates mode="titlepage.mode"/>
  357. </xsl:otherwise>
  358. </xsl:choose>
  359. </xsl:template>
  360. <xsl:template match="holder" mode="titlepage.mode">
  361. <xsl:choose>
  362. <xsl:when test="$show.revisionflag != 0 and @revisionflag">
  363. <span class="{@revisionflag}">
  364. <xsl:apply-templates mode="titlepage.mode"/>
  365. </span>
  366. </xsl:when>
  367. <xsl:otherwise>
  368. <xsl:apply-templates mode="titlepage.mode"/>
  369. </xsl:otherwise>
  370. </xsl:choose>
  371. <xsl:if test="position() &lt; last()">
  372. <xsl:text>, </xsl:text>
  373. </xsl:if>
  374. </xsl:template>
  375. <xsl:template match="corpauthor" mode="titlepage.mode">
  376. <h3>
  377. <xsl:apply-templates select="." mode="common.html.attributes"/>
  378. <xsl:call-template name="id.attribute"/>
  379. <xsl:apply-templates mode="titlepage.mode"/>
  380. </h3>
  381. </xsl:template>
  382. <xsl:template match="corpcredit" mode="titlepage.mode">
  383. <span>
  384. <xsl:apply-templates select="." mode="common.html.attributes"/>
  385. <xsl:call-template name="id.attribute"/>
  386. <xsl:apply-templates mode="titlepage.mode"/>
  387. <br/>
  388. </span>
  389. </xsl:template>
  390. <xsl:template match="corpname" mode="titlepage.mode">
  391. <span>
  392. <xsl:apply-templates select="." mode="common.html.attributes"/>
  393. <xsl:call-template name="id.attribute"/>
  394. <xsl:apply-templates mode="titlepage.mode"/>
  395. <br/>
  396. </span>
  397. </xsl:template>
  398. <xsl:template match="date" mode="titlepage.mode">
  399. <span>
  400. <xsl:apply-templates select="." mode="common.html.attributes"/>
  401. <xsl:call-template name="id.attribute"/>
  402. <xsl:apply-templates mode="titlepage.mode"/>
  403. <br/>
  404. </span>
  405. </xsl:template>
  406. <xsl:template match="edition" mode="titlepage.mode">
  407. <p>
  408. <xsl:apply-templates select="." mode="common.html.attributes"/>
  409. <xsl:call-template name="id.attribute"/>
  410. <xsl:apply-templates mode="titlepage.mode"/>
  411. <xsl:call-template name="gentext.space"/>
  412. <xsl:call-template name="gentext">
  413. <xsl:with-param name="key" select="'Edition'"/>
  414. </xsl:call-template>
  415. </p>
  416. </xsl:template>
  417. <xsl:template match="email" mode="titlepage.mode">
  418. <!-- use the normal e-mail handling code -->
  419. <xsl:apply-templates select="."/>
  420. </xsl:template>
  421. <xsl:template match="firstname" mode="titlepage.mode">
  422. <span>
  423. <xsl:apply-templates select="." mode="common.html.attributes"/>
  424. <xsl:call-template name="id.attribute"/>
  425. <xsl:apply-templates mode="titlepage.mode"/>
  426. <br/>
  427. </span>
  428. </xsl:template>
  429. <xsl:template match="graphic" mode="titlepage.mode">
  430. <!-- use the normal graphic handling code -->
  431. <xsl:apply-templates select="."/>
  432. </xsl:template>
  433. <xsl:template match="honorific" mode="titlepage.mode">
  434. <span>
  435. <xsl:apply-templates select="." mode="common.html.attributes"/>
  436. <xsl:call-template name="id.attribute"/>
  437. <xsl:apply-templates mode="titlepage.mode"/>
  438. <br/>
  439. </span>
  440. </xsl:template>
  441. <xsl:template match="isbn" mode="titlepage.mode">
  442. <span>
  443. <xsl:apply-templates select="." mode="common.html.attributes"/>
  444. <xsl:call-template name="id.attribute"/>
  445. <xsl:apply-templates mode="titlepage.mode"/>
  446. <br/>
  447. </span>
  448. </xsl:template>
  449. <xsl:template match="issn" mode="titlepage.mode">
  450. <span>
  451. <xsl:apply-templates select="." mode="common.html.attributes"/>
  452. <xsl:call-template name="id.attribute"/>
  453. <xsl:apply-templates mode="titlepage.mode"/>
  454. <br/>
  455. </span>
  456. </xsl:template>
  457. <xsl:template match="biblioid" mode="titlepage.mode">
  458. <span>
  459. <xsl:apply-templates select="." mode="common.html.attributes"/>
  460. <xsl:call-template name="id.attribute"/>
  461. <xsl:apply-templates mode="titlepage.mode"/>
  462. <br/>
  463. </span>
  464. </xsl:template>
  465. <xsl:template match="itermset" mode="titlepage.mode">
  466. </xsl:template>
  467. <xsl:template match="invpartnumber" mode="titlepage.mode">
  468. <span>
  469. <xsl:apply-templates select="." mode="common.html.attributes"/>
  470. <xsl:call-template name="id.attribute"/>
  471. <xsl:apply-templates mode="titlepage.mode"/>
  472. <br/>
  473. </span>
  474. </xsl:template>
  475. <xsl:template match="issuenum" mode="titlepage.mode">
  476. <span>
  477. <xsl:apply-templates select="." mode="common.html.attributes"/>
  478. <xsl:call-template name="id.attribute"/>
  479. <xsl:apply-templates mode="titlepage.mode"/>
  480. <br/>
  481. </span>
  482. </xsl:template>
  483. <xsl:template match="jobtitle" mode="titlepage.mode">
  484. <span>
  485. <xsl:apply-templates select="." mode="common.html.attributes"/>
  486. <xsl:call-template name="id.attribute"/>
  487. <xsl:apply-templates mode="titlepage.mode"/>
  488. <br/>
  489. </span>
  490. </xsl:template>
  491. <xsl:template match="keywordset" mode="titlepage.mode">
  492. </xsl:template>
  493. <xsl:template match="legalnotice" mode="titlepage.mode">
  494. <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  495. <xsl:choose>
  496. <xsl:when test="$generate.legalnotice.link != 0">
  497. <!-- Compute name of legalnotice file -->
  498. <xsl:variable name="file">
  499. <xsl:call-template name="ln.or.rh.filename"/>
  500. </xsl:variable>
  501. <xsl:variable name="filename">
  502. <xsl:call-template name="make-relative-filename">
  503. <xsl:with-param name="base.dir" select="$chunk.base.dir"/>
  504. <xsl:with-param name="base.name" select="$file"/>
  505. </xsl:call-template>
  506. </xsl:variable>
  507. <xsl:variable name="title">
  508. <xsl:apply-templates select="." mode="title.markup"/>
  509. </xsl:variable>
  510. <a href="{$file}">
  511. <xsl:copy-of select="$title"/>
  512. </a>
  513. <xsl:call-template name="write.chunk">
  514. <xsl:with-param name="filename" select="$filename"/>
  515. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  516. <xsl:with-param name="content">
  517. <xsl:call-template name="user.preroot"/>
  518. <html>
  519. <head>
  520. <xsl:call-template name="system.head.content"/>
  521. <xsl:call-template name="head.content"/>
  522. <xsl:call-template name="user.head.content"/>
  523. </head>
  524. <body>
  525. <xsl:call-template name="body.attributes"/>
  526. <div>
  527. <xsl:apply-templates select="." mode="common.html.attributes"/>
  528. <xsl:call-template name="id.attribute">
  529. <xsl:with-param name="conditional" select="0"/>
  530. </xsl:call-template>
  531. <xsl:apply-templates mode="titlepage.mode"/>
  532. </div>
  533. </body>
  534. </html>
  535. <xsl:value-of select="$chunk.append"/>
  536. </xsl:with-param>
  537. </xsl:call-template>
  538. </xsl:when>
  539. <xsl:otherwise>
  540. <div>
  541. <xsl:apply-templates select="." mode="common.html.attributes"/>
  542. <xsl:call-template name="id.attribute">
  543. <xsl:with-param name="conditional" select="0"/>
  544. </xsl:call-template>
  545. <xsl:call-template name="anchor">
  546. <xsl:with-param name="conditional" select="0"/>
  547. </xsl:call-template>
  548. <xsl:apply-templates mode="titlepage.mode"/>
  549. </div>
  550. </xsl:otherwise>
  551. </xsl:choose>
  552. </xsl:template>
  553. <xsl:template match="legalnotice/title" mode="titlepage.mode">
  554. <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
  555. </xsl:template>
  556. <xsl:template match="lineage" mode="titlepage.mode">
  557. <span>
  558. <xsl:apply-templates select="." mode="common.html.attributes"/>
  559. <xsl:call-template name="id.attribute"/>
  560. <xsl:apply-templates mode="titlepage.mode"/>
  561. <br/>
  562. </span>
  563. </xsl:template>
  564. <xsl:template match="modespec" mode="titlepage.mode">
  565. </xsl:template>
  566. <xsl:template match="orgdiv" mode="titlepage.mode">
  567. <xsl:if test="preceding-sibling::*[1][self::orgname]">
  568. <xsl:text> </xsl:text>
  569. </xsl:if>
  570. <span>
  571. <xsl:apply-templates select="." mode="common.html.attributes"/>
  572. <xsl:call-template name="id.attribute"/>
  573. <xsl:apply-templates mode="titlepage.mode"/>
  574. <br/>
  575. </span>
  576. </xsl:template>
  577. <xsl:template match="orgname" mode="titlepage.mode">
  578. <span>
  579. <xsl:apply-templates select="." mode="common.html.attributes"/>
  580. <xsl:call-template name="id.attribute"/>
  581. <xsl:apply-templates mode="titlepage.mode"/>
  582. <br/>
  583. </span>
  584. </xsl:template>
  585. <xsl:template match="othercredit" mode="titlepage.mode">
  586. <xsl:choose>
  587. <xsl:when test="not($othercredit.like.author.enabled = 0)">
  588. <xsl:variable name="contrib" select="string(contrib)"/>
  589. <xsl:choose>
  590. <xsl:when test="contrib">
  591. <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
  592. <xsl:call-template name="paragraph">
  593. <xsl:with-param name="class" select="local-name(.)"/>
  594. <xsl:with-param name="content">
  595. <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
  596. <xsl:text>: </xsl:text>
  597. <xsl:call-template name="person.name"/>
  598. <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
  599. <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
  600. </xsl:with-param>
  601. </xsl:call-template>
  602. </xsl:if>
  603. </xsl:when>
  604. <xsl:otherwise>
  605. <xsl:call-template name="paragraph">
  606. <xsl:with-param name="class" select="local-name(.)"/>
  607. <xsl:with-param name="content">
  608. <xsl:call-template name="person.name"/>
  609. </xsl:with-param>
  610. </xsl:call-template>
  611. <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
  612. </xsl:otherwise>
  613. </xsl:choose>
  614. </xsl:when>
  615. <xsl:otherwise>
  616. <xsl:call-template name="credits.div"/>
  617. </xsl:otherwise>
  618. </xsl:choose>
  619. </xsl:template>
  620. <xsl:template match="othercredit" mode="titlepage.othercredits">
  621. <xsl:text>, </xsl:text>
  622. <xsl:call-template name="person.name"/>
  623. </xsl:template>
  624. <xsl:template match="othername" mode="titlepage.mode">
  625. <span>
  626. <xsl:apply-templates select="." mode="common.html.attributes"/>
  627. <xsl:call-template name="id.attribute"/>
  628. <xsl:apply-templates mode="titlepage.mode"/>
  629. <br/>
  630. </span>
  631. </xsl:template>
  632. <xsl:template match="pagenums" mode="titlepage.mode">
  633. <span>
  634. <xsl:apply-templates select="." mode="common.html.attributes"/>
  635. <xsl:call-template name="id.attribute"/>
  636. <xsl:apply-templates mode="titlepage.mode"/>
  637. <br/>
  638. </span>
  639. </xsl:template>
  640. <xsl:template match="printhistory" mode="titlepage.mode">
  641. <div>
  642. <xsl:apply-templates select="." mode="common.html.attributes"/>
  643. <xsl:call-template name="id.attribute"/>
  644. <xsl:apply-templates mode="titlepage.mode"/>
  645. </div>
  646. </xsl:template>
  647. <xsl:template match="productname" mode="titlepage.mode">
  648. <span>
  649. <xsl:apply-templates select="." mode="common.html.attributes"/>
  650. <xsl:call-template name="id.attribute"/>
  651. <xsl:apply-templates mode="titlepage.mode"/>
  652. <br/>
  653. </span>
  654. </xsl:template>
  655. <xsl:template match="productnumber" mode="titlepage.mode">
  656. <span>
  657. <xsl:apply-templates select="." mode="common.html.attributes"/>
  658. <xsl:call-template name="id.attribute"/>
  659. <xsl:apply-templates mode="titlepage.mode"/>
  660. <br/>
  661. </span>
  662. </xsl:template>
  663. <xsl:template match="pubdate" mode="titlepage.mode">
  664. <xsl:call-template name="paragraph">
  665. <xsl:with-param name="class" select="local-name(.)"/>
  666. <xsl:with-param name="content">
  667. <xsl:apply-templates mode="titlepage.mode"/>
  668. </xsl:with-param>
  669. </xsl:call-template>
  670. </xsl:template>
  671. <xsl:template match="publisher" mode="titlepage.mode">
  672. <xsl:call-template name="paragraph">
  673. <xsl:with-param name="class" select="local-name(.)"/>
  674. <xsl:with-param name="content">
  675. <xsl:apply-templates mode="titlepage.mode"/>
  676. </xsl:with-param>
  677. </xsl:call-template>
  678. </xsl:template>
  679. <xsl:template match="publishername" mode="titlepage.mode">
  680. <span>
  681. <xsl:apply-templates select="." mode="common.html.attributes"/>
  682. <xsl:call-template name="id.attribute"/>
  683. <xsl:apply-templates mode="titlepage.mode"/>
  684. <br/>
  685. </span>
  686. </xsl:template>
  687. <xsl:template match="pubsnumber" mode="titlepage.mode">
  688. <span>
  689. <xsl:apply-templates select="." mode="common.html.attributes"/>
  690. <xsl:call-template name="id.attribute"/>
  691. <xsl:apply-templates mode="titlepage.mode"/>
  692. <br/>
  693. </span>
  694. </xsl:template>
  695. <xsl:template match="releaseinfo" mode="titlepage.mode">
  696. <xsl:call-template name="paragraph">
  697. <xsl:with-param name="class" select="local-name(.)"/>
  698. <xsl:with-param name="content">
  699. <xsl:apply-templates mode="titlepage.mode"/>
  700. </xsl:with-param>
  701. </xsl:call-template>
  702. </xsl:template>
  703. <xsl:template match="revhistory" mode="titlepage.mode">
  704. <xsl:variable name="numcols">
  705. <xsl:choose>
  706. <xsl:when test=".//authorinitials|.//author">3</xsl:when>
  707. <xsl:otherwise>2</xsl:otherwise>
  708. </xsl:choose>
  709. </xsl:variable>
  710. <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  711. <xsl:variable name="title">
  712. <xsl:call-template name="gentext">
  713. <xsl:with-param name="key">RevHistory</xsl:with-param>
  714. </xsl:call-template>
  715. </xsl:variable>
  716. <xsl:variable name="contents">
  717. <div>
  718. <xsl:apply-templates select="." mode="common.html.attributes"/>
  719. <xsl:call-template name="id.attribute"/>
  720. <table>
  721. <xsl:if test="$css.decoration != 0">
  722. <xsl:attribute name="style">
  723. <xsl:text>border-style:solid; width:100%;</xsl:text>
  724. </xsl:attribute>
  725. </xsl:if>
  726. <!-- include summary attribute if not HTML5 -->
  727. <xsl:if test="$div.element != 'section'">
  728. <xsl:attribute name="summary">
  729. <xsl:call-template name="gentext">
  730. <xsl:with-param name="key">revhistory</xsl:with-param>
  731. </xsl:call-template>
  732. </xsl:attribute>
  733. </xsl:if>
  734. <tr>
  735. <th align="{$direction.align.start}" valign="top" colspan="{$numcols}">
  736. <b>
  737. <xsl:call-template name="gentext">
  738. <xsl:with-param name="key" select="'RevHistory'"/>
  739. </xsl:call-template>
  740. </b>
  741. </th>
  742. </tr>
  743. <xsl:apply-templates mode="titlepage.mode">
  744. <xsl:with-param name="numcols" select="$numcols"/>
  745. </xsl:apply-templates>
  746. </table>
  747. </div>
  748. </xsl:variable>
  749. <xsl:choose>
  750. <xsl:when test="$generate.revhistory.link != 0">
  751. <!-- Compute name of revhistory file -->
  752. <xsl:variable name="file">
  753. <xsl:call-template name="ln.or.rh.filename">
  754. <xsl:with-param name="is.ln" select="false()"/>
  755. </xsl:call-template>
  756. </xsl:variable>
  757. <xsl:variable name="filename">
  758. <xsl:call-template name="make-relative-filename">
  759. <xsl:with-param name="base.dir" select="$chunk.base.dir"/>
  760. <xsl:with-param name="base.name" select="$file"/>
  761. </xsl:call-template>
  762. </xsl:variable>
  763. <a href="{$file}">
  764. <xsl:copy-of select="$title"/>
  765. </a>
  766. <xsl:call-template name="write.chunk">
  767. <xsl:with-param name="filename" select="$filename"/>
  768. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  769. <xsl:with-param name="content">
  770. <xsl:call-template name="user.preroot"/>
  771. <html>
  772. <head>
  773. <xsl:call-template name="system.head.content"/>
  774. <xsl:call-template name="head.content">
  775. <xsl:with-param name="title">
  776. <xsl:value-of select="$title"/>
  777. <xsl:if test="../../title">
  778. <xsl:value-of select="concat(' (', ../../title, ')')"/>
  779. </xsl:if>
  780. </xsl:with-param>
  781. </xsl:call-template>
  782. <xsl:call-template name="user.head.content"/>
  783. </head>
  784. <body>
  785. <xsl:call-template name="body.attributes"/>
  786. <xsl:copy-of select="$contents"/>
  787. </body>
  788. </html>
  789. <xsl:text>&#x0a;</xsl:text>
  790. </xsl:with-param>
  791. </xsl:call-template>
  792. </xsl:when>
  793. <xsl:otherwise>
  794. <xsl:copy-of select="$contents"/>
  795. </xsl:otherwise>
  796. </xsl:choose>
  797. </xsl:template>
  798. <xsl:template match="revhistory/revision" mode="titlepage.mode">
  799. <xsl:param name="numcols" select="'3'"/>
  800. <xsl:variable name="revnumber" select="revnumber"/>
  801. <xsl:variable name="revdate" select="date"/>
  802. <xsl:variable name="revauthor" select="authorinitials|author"/>
  803. <xsl:variable name="revremark" select="revremark|revdescription"/>
  804. <tr>
  805. <td align="{$direction.align.start}">
  806. <xsl:if test="$revnumber">
  807. <xsl:call-template name="gentext">
  808. <xsl:with-param name="key" select="'Revision'"/>
  809. </xsl:call-template>
  810. <xsl:call-template name="gentext.space"/>
  811. <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
  812. </xsl:if>
  813. </td>
  814. <td align="{$direction.align.start}">
  815. <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
  816. </td>
  817. <xsl:choose>
  818. <xsl:when test="$revauthor">
  819. <td align="{$direction.align.start}">
  820. <xsl:for-each select="$revauthor">
  821. <xsl:apply-templates select="." mode="titlepage.mode"/>
  822. <xsl:if test="position() != last()">
  823. <xsl:text>, </xsl:text>
  824. </xsl:if>
  825. </xsl:for-each>
  826. </td>
  827. </xsl:when>
  828. <xsl:when test="$numcols &gt; 2">
  829. <td>&#160;</td>
  830. </xsl:when>
  831. <xsl:otherwise></xsl:otherwise>
  832. </xsl:choose>
  833. </tr>
  834. <xsl:if test="$revremark">
  835. <tr>
  836. <td align="{$direction.align.start}" colspan="{$numcols}">
  837. <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
  838. </td>
  839. </tr>
  840. </xsl:if>
  841. </xsl:template>
  842. <xsl:template match="revision/revnumber" mode="titlepage.mode">
  843. <xsl:apply-templates mode="titlepage.mode"/>
  844. </xsl:template>
  845. <xsl:template match="revision/date" mode="titlepage.mode">
  846. <xsl:apply-templates mode="titlepage.mode"/>
  847. </xsl:template>
  848. <xsl:template match="revision/authorinitials" mode="titlepage.mode">
  849. <xsl:apply-templates mode="titlepage.mode"/>
  850. </xsl:template>
  851. <xsl:template match="revision/author" mode="titlepage.mode">
  852. <xsl:apply-templates mode="titlepage.mode"/>
  853. </xsl:template>
  854. <xsl:template match="revision/revremark" mode="titlepage.mode">
  855. <xsl:apply-templates mode="titlepage.mode"/>
  856. </xsl:template>
  857. <xsl:template match="revision/revdescription" mode="titlepage.mode">
  858. <xsl:apply-templates mode="titlepage.mode"/>
  859. </xsl:template>
  860. <xsl:template match="seriesvolnums" mode="titlepage.mode">
  861. <span>
  862. <xsl:apply-templates select="." mode="common.html.attributes"/>
  863. <xsl:call-template name="id.attribute"/>
  864. <xsl:apply-templates mode="titlepage.mode"/>
  865. <br/>
  866. </span>
  867. </xsl:template>
  868. <xsl:template match="shortaffil" mode="titlepage.mode">
  869. <span>
  870. <xsl:apply-templates select="." mode="common.html.attributes"/>
  871. <xsl:call-template name="id.attribute"/>
  872. <xsl:apply-templates mode="titlepage.mode"/>
  873. <br/>
  874. </span>
  875. </xsl:template>
  876. <xsl:template match="subjectset" mode="titlepage.mode">
  877. </xsl:template>
  878. <xsl:template match="subtitle" mode="titlepage.mode">
  879. <h2>
  880. <xsl:apply-templates select="." mode="common.html.attributes"/>
  881. <xsl:call-template name="id.attribute"/>
  882. <xsl:apply-templates mode="titlepage.mode"/>
  883. </h2>
  884. </xsl:template>
  885. <xsl:template match="surname" mode="titlepage.mode">
  886. <span>
  887. <xsl:apply-templates select="." mode="common.html.attributes"/>
  888. <xsl:call-template name="id.attribute"/>
  889. <xsl:apply-templates mode="titlepage.mode"/>
  890. <br/>
  891. </span>
  892. </xsl:template>
  893. <xsl:template match="title" mode="titlepage.mode">
  894. <xsl:variable name="id">
  895. <xsl:choose>
  896. <!-- if title is in an *info wrapper, get the grandparent -->
  897. <xsl:when test="contains(local-name(..), 'info')">
  898. <xsl:call-template name="object.id">
  899. <xsl:with-param name="object" select="../.."/>
  900. </xsl:call-template>
  901. </xsl:when>
  902. <xsl:otherwise>
  903. <xsl:call-template name="object.id">
  904. <xsl:with-param name="object" select=".."/>
  905. </xsl:call-template>
  906. </xsl:otherwise>
  907. </xsl:choose>
  908. </xsl:variable>
  909. <h1>
  910. <xsl:apply-templates select="." mode="common.html.attributes"/>
  911. <xsl:choose>
  912. <xsl:when test="$generate.id.attributes = 0">
  913. <a name="{$id}"/>
  914. </xsl:when>
  915. <xsl:otherwise>
  916. </xsl:otherwise>
  917. </xsl:choose>
  918. <xsl:choose>
  919. <xsl:when test="$show.revisionflag != 0 and @revisionflag">
  920. <span class="{@revisionflag}">
  921. <xsl:apply-templates mode="titlepage.mode"/>
  922. </span>
  923. </xsl:when>
  924. <xsl:otherwise>
  925. <xsl:apply-templates mode="titlepage.mode"/>
  926. </xsl:otherwise>
  927. </xsl:choose>
  928. </h1>
  929. </xsl:template>
  930. <xsl:template match="titleabbrev" mode="titlepage.mode">
  931. <!-- nop; title abbreviations don't belong on the title page! -->
  932. </xsl:template>
  933. <xsl:template match="volumenum" mode="titlepage.mode">
  934. <span>
  935. <xsl:apply-templates select="." mode="common.html.attributes"/>
  936. <xsl:call-template name="id.attribute"/>
  937. <xsl:apply-templates mode="titlepage.mode"/>
  938. <br/>
  939. </span>
  940. </xsl:template>
  941. <!-- This template computes the filename for legalnotice and revhistory chunks -->
  942. <xsl:template name="ln.or.rh.filename">
  943. <xsl:param name="node" select="."/>
  944. <xsl:param name="is.ln" select="true()"/>
  945. <xsl:variable name="dbhtml-filename">
  946. <xsl:call-template name="pi.dbhtml_filename">
  947. <xsl:with-param name="node" select="$node"/>
  948. </xsl:call-template>
  949. </xsl:variable>
  950. <xsl:choose>
  951. <!-- 1. If there is a dbhtml_filename PI, use that -->
  952. <xsl:when test="$dbhtml-filename != ''">
  953. <xsl:value-of select="$dbhtml-filename"/>
  954. </xsl:when>
  955. <xsl:when test="($node/@id or $node/@xml:id) and not($use.id.as.filename = 0)">
  956. <!-- * 2. If this legalnotice/revhistory has an ID, then go ahead and use -->
  957. <!-- * just the value of that ID as the basename for the file -->
  958. <!-- * (that is, without prepending an "ln-" or "rh-" to it) -->
  959. <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/>
  960. <xsl:value-of select="$html.ext"/>
  961. </xsl:when>
  962. <xsl:when test="not ($node/@id or $node/@xml:id) or $use.id.as.filename = 0">
  963. <!-- * 3. Otherwise, if this legalnotice/revhistory does not have an ID, or -->
  964. <!-- * if $use.id.as.filename = 0 -->
  965. <!-- * then we generate an ID... -->
  966. <xsl:variable name="id">
  967. <xsl:value-of select="generate-id($node)"/>
  968. </xsl:variable>
  969. <!-- * ...and then we take that generated ID, prepend a -->
  970. <!-- * prefix to it, and use that as the basename for the file -->
  971. <xsl:choose>
  972. <xsl:when test="$is.ln">
  973. <xsl:value-of select="concat('ln-',$id,$html.ext)"/>
  974. </xsl:when>
  975. <xsl:otherwise>
  976. <xsl:value-of select="concat('rh-',$id,$html.ext)"/>
  977. </xsl:otherwise>
  978. </xsl:choose>
  979. </xsl:when>
  980. </xsl:choose>
  981. </xsl:template>
  982. <!-- ==================================================================== -->
  983. </xsl:stylesheet>