docbook-to-html.xsl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE xsl:stylesheet [
  3. <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
  4. <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
  5. <!ENTITY primary 'normalize-space(concat(d:primary/@sortas, d:primary[not(@sortas)]))'>
  6. <!ENTITY secondary 'normalize-space(concat(d:secondary/@sortas, d:secondary[not(@sortas)]))'>
  7. <!ENTITY tertiary 'normalize-space(concat(d:tertiary/@sortas, d:tertiary[not(@sortas)]))'>
  8. <!ENTITY section '(ancestor-or-self::d:set
  9. |ancestor-or-self::d:book
  10. |ancestor-or-self::d:part
  11. |ancestor-or-self::d:reference
  12. |ancestor-or-self::d:partintro
  13. |ancestor-or-self::d:chapter
  14. |ancestor-or-self::d:appendix
  15. |ancestor-or-self::d:preface
  16. |ancestor-or-self::d:article
  17. |ancestor-or-self::d:section
  18. |ancestor-or-self::d:sect1
  19. |ancestor-or-self::d:sect2
  20. |ancestor-or-self::d:sect3
  21. |ancestor-or-self::d:sect4
  22. |ancestor-or-self::d:sect5
  23. |ancestor-or-self::d:refentry
  24. |ancestor-or-self::d:refsect1
  25. |ancestor-or-self::d:refsect2
  26. |ancestor-or-self::d:refsect3
  27. |ancestor-or-self::d:simplesect
  28. |ancestor-or-self::d:bibliography
  29. |ancestor-or-self::d:glossary
  30. |ancestor-or-self::d:index
  31. |ancestor-or-self::d:webpage)[last()]'>
  32. <!ENTITY section.id 'generate-id(&section;)'>
  33. <!ENTITY sep '" "'>
  34. <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())
  35. and ($role = @role or $type = @type or
  36. (string-length($role) = 0 and string-length($type) = 0))'>
  37. ]>
  38. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  39. xmlns:d="http://docbook.org/ns/docbook"
  40. version="1.0">
  41. <xsl:param name="top.name">Home</xsl:param>
  42. <!--<xsl:param name="body.attributes">Home</xsl:param>-->
  43. <xsl:template name="component.toc">
  44. </xsl:template>
  45. <xsl:template name="header.navigation">
  46. <xsl:param name="prev" select="/foo"/>
  47. <xsl:param name="next" select="/foo"/>
  48. <xsl:param name="nav.context"/>
  49. <xsl:variable name="home" select="/*[1]"/>
  50. <xsl:variable name="up" select="parent::*"/>
  51. <xsl:variable name="row1" select="$navig.showtitles != 0"/>
  52. <xsl:variable name="row2" select="count($prev) &gt; 0
  53. or (count($up) &gt; 0
  54. and generate-id($up) != generate-id($home)
  55. and $navig.showtitles != 0)
  56. or count($next) &gt; 0"/>
  57. <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
  58. <div class="navcol">
  59. <xsl:call-template name="user.header.logo"/>
  60. <div class="navbar">
  61. <xsl:call-template name="extra.header.navigation"/>
  62. <xsl:call-template name="section.toc">
  63. <xsl:with-param name="toc.title.p" select="0"/>
  64. </xsl:call-template>
  65. <xsl:call-template name="extra.footer.navigation"/>
  66. </div>
  67. </div>
  68. </xsl:if>
  69. </xsl:template>
  70. <xsl:template name="extra.header.navigation">
  71. </xsl:template>
  72. <xsl:template name="extra.footer.navigation">
  73. </xsl:template>
  74. <xsl:template match="d:setindex
  75. |d:book/d:index
  76. |d:article/d:index">
  77. <!-- some implementations use completely empty index tags to indicate -->
  78. <!-- where an automatically generated index should be inserted. so -->
  79. <!-- if the index is completely empty, skip it. -->
  80. <div foo="new-index1">
  81. <xsl:if test="count(*)>0 or $generate.index != '0'">
  82. <div foo="new-index2">
  83. <xsl:call-template name="process-chunk"/>
  84. </div>
  85. </xsl:if>
  86. </div>
  87. </xsl:template>
  88. <xsl:template name="index.titlepage">
  89. </xsl:template>
  90. <!-- value-of $primary moved to mode="reference" -->
  91. <xsl:template match="d:indexterm" mode="index-primary">
  92. <xsl:param name="scope" select="."/>
  93. <xsl:param name="role" select="''"/>
  94. <xsl:param name="type" select="''"/>
  95. <xsl:variable name="key" select="&primary;"/>
  96. <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
  97. <xsl:element name="dt" namespace="{$html.namespace}">
  98. <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
  99. <xsl:apply-templates select="." mode="reference">
  100. <xsl:with-param name="scope" select="$scope"/>
  101. <xsl:with-param name="role" select="$role"/>
  102. <xsl:with-param name="type" select="$type"/>
  103. </xsl:apply-templates>
  104. </xsl:for-each>
  105. </xsl:element>
  106. </xsl:template>
  107. <xsl:template match="d:indexterm" mode="reference">
  108. <xsl:param name="scope" select="."/>
  109. <xsl:param name="role" select="''"/>
  110. <xsl:param name="type" select="''"/>
  111. <xsl:param name="separator" select="': '"/>
  112. <xsl:element name="a" namespace="{$html.namespace}">
  113. <xsl:variable name="title">
  114. <xsl:choose>
  115. <xsl:when test="&section;/d:titleabbrev and $index.prefer.titleabbrev != 0">
  116. <xsl:apply-templates select="&section;" mode="titleabbrev.markup"/>
  117. </xsl:when>
  118. <xsl:otherwise>
  119. <xsl:apply-templates select="&section;" mode="title.markup"/>
  120. </xsl:otherwise>
  121. </xsl:choose>
  122. </xsl:variable>
  123. <xsl:attribute name="href">
  124. <xsl:call-template name="href.target">
  125. <xsl:with-param name="object" select="."/>
  126. <xsl:with-param name="context" select="//d:index[&scope;][1]"/>
  127. </xsl:call-template>
  128. </xsl:attribute>
  129. <xsl:attribute name="xref">
  130. <xsl:value-of select="local-name()"/>
  131. </xsl:attribute>
  132. <xsl:value-of select="d:primary"/>
  133. </xsl:element><xsl:value-of select="$separator"/>
  134. <xsl:element name="a" namespace="{$html.namespace}">
  135. <xsl:variable name="title">
  136. <xsl:choose>
  137. <xsl:when test="&section;/d:titleabbrev and $index.prefer.titleabbrev != 0">
  138. <xsl:apply-templates select="&section;" mode="titleabbrev.markup"/>
  139. </xsl:when>
  140. <xsl:otherwise>
  141. <xsl:apply-templates select="&section;" mode="title.markup"/>
  142. </xsl:otherwise>
  143. </xsl:choose>
  144. </xsl:variable>
  145. <xsl:attribute name="href">
  146. <xsl:call-template name="href.target">
  147. <xsl:with-param name="object" select="."/>
  148. <xsl:with-param name="object" select="&section;"/>
  149. <xsl:with-param name="context" select="//d:index[&scope;][1]"/>
  150. </xsl:call-template>
  151. </xsl:attribute>
  152. <xsl:attribute name="xref">
  153. <xsl:value-of select="local-name()"/>
  154. </xsl:attribute>
  155. <xsl:value-of select="$title"/> <!-- text only -->
  156. </xsl:element>
  157. <xsl:if test="key('endofrange', @id)[&scope;]">
  158. <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]"
  159. mode="reference">
  160. <xsl:with-param name="scope" select="$scope"/>
  161. <xsl:with-param name="role" select="$role"/>
  162. <xsl:with-param name="type" select="$type"/>
  163. <xsl:with-param name="separator" select="'-'"/>
  164. </xsl:apply-templates>
  165. </xsl:if>
  166. </xsl:template>
  167. <xsl:template match="d:prompt">
  168. <xsl:element name="span" namespace="{$html.namespace}"><xsl:attribute name="class">prompt</xsl:attribute><xsl:apply-templates/></xsl:element>
  169. </xsl:template>
  170. <xsl:template match="d:synopsis">
  171. <xsl:element name="p" namespace="{$html.namespace}"><xsl:attribute name="class"><xsl:value-of select="name(.)"/></xsl:attribute><xsl:attribute name="kind"><xsl:value-of select="d:phrase[@role='category']/d:emphasis"/></xsl:attribute>
  172. <!--kind="d:phrase[@role='category']/d:emphasis">-->
  173. <!--
  174. <xsl:if test="@role">
  175. <span class="kind"><xsl:value-of select="@role"/></span><span class="ignore">: </span>
  176. </xsl:if>
  177. -->
  178. <xsl:if test="d:phrase[@role='category']">
  179. <xsl:element name="span" namespace="{$html.namespace}"><xsl:attribute name="class">kind</xsl:attribute><xsl:value-of select="d:phrase[@role='category']/d:emphasis"/></xsl:element><xsl:element name="span" namespace="{$html.namespace}"><xsl:attribute name="class">ignore</xsl:attribute>: </xsl:element>
  180. </xsl:if>
  181. <xsl:apply-templates/>
  182. </xsl:element>
  183. </xsl:template>
  184. <xsl:template match="d:synopsis/d:phrase[@role='category']">
  185. </xsl:template>
  186. <!--
  187. <xsl:param name="local.l10n.xml" select="document('')"/>
  188. <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
  189. <l:l10n language="en">
  190. <l:context name="xref">
  191. <l:template name="chapter" text="%t"/>
  192. <l:template name="sect1" text="%t"/>
  193. <l:template name="sect2" text="%t"/>
  194. </l:context>
  195. </l:l10n>
  196. </l:i18n>
  197. -->
  198. <!--The distributed stylesheets emit the <term>s as a comma-separate
  199. list on a single line. Let's put each term in a separate <dt>. -->
  200. <xsl:template match="d:varlistentry">
  201. <xsl:call-template name="anchor"/>
  202. <xsl:apply-templates select="d:term"/>
  203. <dd>
  204. <xsl:apply-templates select="d:listitem"/>
  205. </dd>
  206. </xsl:template>
  207. <xsl:template match="d:varlistentry/d:term">
  208. <dt class="term">
  209. <xsl:call-template name="anchor"/>
  210. <xsl:apply-templates/>
  211. </dt>
  212. </xsl:template>
  213. <xsl:template name="section.toc">
  214. <xsl:param name="toc-context" select="."/>
  215. <xsl:param name="toc.title.p" select="true()"/>
  216. <div class="toc">
  217. <ul>
  218. <xsl:apply-templates select="/d:book/d:part|/d:book/d:chapter|/d:book/d:appendix" mode="chunk-toc">
  219. <xsl:with-param name="toc-context" select="$toc-context"/>
  220. <xsl:with-param name="context-depth" select="count(ancestor::*)"/>
  221. </xsl:apply-templates>
  222. <li><a href="ToC{$html.ext}">Table of Contents</a></li>
  223. </ul>
  224. </div>
  225. </xsl:template>
  226. <xsl:template name="toc.line.in-navbar">
  227. <xsl:param name="toc-context" select="."/>
  228. <xsl:param name="depth" select="1"/>
  229. <xsl:param name="depth.from.context" select="8"/>
  230. <xsl:element name="a" namespace="{$html.namespace}">
  231. <xsl:attribute name="href">
  232. <xsl:call-template name="href.target">
  233. <xsl:with-param name="context" select="$toc-context"/>
  234. </xsl:call-template>
  235. </xsl:attribute>
  236. <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  237. </xsl:element>
  238. </xsl:template>
  239. <xsl:template name="toc.xline">
  240. <xsl:param name="toc-context" select="."/>
  241. <xsl:variable name="filename">
  242. <xsl:apply-templates mode="chunk-filename" select="."/>
  243. </xsl:variable>
  244. <xsl:variable name="context-filename">
  245. <xsl:apply-templates mode="chunk-filename" select="$toc-context"/>
  246. </xsl:variable>
  247. <xsl:choose>
  248. <xsl:when test="$filename=$context-filename">
  249. <b class="toc">
  250. <xsl:call-template name="toc.line.in-navbar">
  251. <xsl:with-param name="toc-context" select="$toc-context"/>
  252. </xsl:call-template>
  253. </b>
  254. </xsl:when>
  255. <xsl:otherwise>
  256. <xsl:call-template name="toc.line.in-navbar">
  257. <xsl:with-param name="toc-context" select="$toc-context"/>
  258. </xsl:call-template>
  259. </xsl:otherwise>
  260. </xsl:choose>
  261. </xsl:template>
  262. <xsl:template match="chapter[@id='Top']" mode="chunk-toc"><!--ignore-->
  263. </xsl:template>
  264. <xsl:template match="*" mode="chunk-toc">
  265. <xsl:param name="toc-context" select="."/>
  266. <xsl:param name="depth" select="count(ancestor::*)"/>
  267. <xsl:param name="context-depth" select="1"/>
  268. <li>
  269. <xsl:variable name="children" select="d:part|d:chapter|d:sect1|d:sect2|d:sect3"/>
  270. <xsl:call-template name="toc.xline">
  271. <xsl:with-param name="toc-context" select="$toc-context"/>
  272. </xsl:call-template>
  273. <xsl:if test="$children and @label = $toc-context/ancestor-or-self::*/@label">
  274. <ul>
  275. <xsl:apply-templates select="$children" mode="chunk-toc">
  276. <xsl:with-param name="toc-context" select="$toc-context"/>
  277. <xsl:with-param name="context-depth" select="$context-depth"/>
  278. </xsl:apply-templates>
  279. </ul>
  280. </xsl:if>
  281. </li>
  282. </xsl:template>
  283. <xsl:template match="*" mode="footer.toc">
  284. <li><xsl:call-template name="toc.xline">
  285. <xsl:with-param name="toc-context" select="."/>
  286. </xsl:call-template></li></xsl:template>
  287. <xsl:template name="footer.navigation">
  288. <xsl:param name="prev" select="/foo"/>
  289. <xsl:param name="next" select="/foo"/>
  290. <xsl:param name="nav.context"/>
  291. <!--<xsl:variable name="home" select="/*[1]"/>-->
  292. <xsl:variable name="root" select="/*[1]"/>
  293. <xsl:variable name="home" select="/*[1]/d:chapter[1]"/>
  294. <xsl:variable name="up" select="parent::*"/>
  295. <xsl:variable name="children" select="d:chapter|d:sect1|d:sect2|d:sect3"/>
  296. <xsl:variable name="xnext" select="(following-sibling::d:chapter|following-sibling::d:sect1)[1]"/>
  297. <xsl:variable name="xprev" select="(preceding-sibling::d:chapter|preceding-sibling::d:sect1)[last()]"/>
  298. <!--
  299. <xsl:variable name="rnext" select="(child::d:chapter|child::d:sect1|following::d:chapter|following::d:sect1)[1]"/>
  300. <xsl:variable name="rprev" select="(parent::d:chapter|parent::d:sect1|preceding::d:chapter|preceding::d:sect1)[last()]"/>
  301. -->
  302. <xsl:variable name="row1" select="count($prev) &gt; 0
  303. or count($up) &gt; 0
  304. or count($next) &gt; 0"/>
  305. <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
  306. or (generate-id($home) != generate-id(.)
  307. or $nav.context = 'toc')
  308. or ($chunk.tocs.and.lots != 0
  309. and $nav.context != 'toc')
  310. or ($next and $navig.showtitles != 0)"/>
  311. <div class="navfooter">
  312. <xsl:if test="$children">
  313. <ul>
  314. <xsl:apply-templates select="d:part|d:chapter|d:sect1|d:sect2|d:sect3" mode="footer.toc">
  315. <xsl:with-param name="toc-context" select="."/>
  316. </xsl:apply-templates>
  317. </ul>
  318. </xsl:if>
  319. <xsl:if test="generate-id($home) = generate-id(.)">
  320. <ul>
  321. <xsl:apply-templates select="$home/following-sibling::d:chapter|$root/d:part" mode="footer.toc">
  322. <xsl:with-param name="toc-context" select="."/>
  323. </xsl:apply-templates>
  324. <li><b class="toc"><a href="ToC{$html.ext}">Table of Contents</a></b></li>
  325. </ul>
  326. </xsl:if>
  327. <!--
  328. <table width="100%" summary="Navigation footer">
  329. <xsl:if test="$row1">
  330. <tr>
  331. <td width="40%" align="{$direction.align.start}">
  332. <xsl:if test="count($prev)>0">
  333. <a accesskey="p">
  334. <xsl:attribute name="href">
  335. <xsl:call-template name="href.target">
  336. <xsl:with-param name="object" select="$prev"/>
  337. </xsl:call-template>
  338. </xsl:attribute>
  339. <xsl:call-template name="navig.content">
  340. <xsl:with-param name="direction" select="'prev'"/>
  341. </xsl:call-template>
  342. </a>
  343. </xsl:if>
  344. <xsl:text>&#160;</xsl:text>
  345. </td>
  346. <td width="20%" align="center">
  347. <xsl:choose>
  348. <xsl:when test="count($up)&gt;0
  349. and generate-id($up) != generate-id($home)">
  350. <a accesskey="u">
  351. <xsl:attribute name="href">
  352. <xsl:call-template name="href.target">
  353. <xsl:with-param name="object" select="$up"/>
  354. </xsl:call-template>
  355. </xsl:attribute>
  356. <xsl:call-template name="navig.content">
  357. <xsl:with-param name="direction" select="'up'"/>
  358. </xsl:call-template>
  359. </a>
  360. </xsl:when>
  361. <xsl:otherwise>&#160;</xsl:otherwise>
  362. </xsl:choose>
  363. </td>
  364. <td width="40%" align="{$direction.align.end}">
  365. <xsl:text>&#160;</xsl:text>
  366. <xsl:if test="count($next)>0">
  367. <a accesskey="n">
  368. <xsl:attribute name="href">
  369. <xsl:call-template name="href.target">
  370. <xsl:with-param name="object" select="$next"/>
  371. </xsl:call-template>
  372. </xsl:attribute>
  373. <xsl:call-template name="navig.content">
  374. <xsl:with-param name="direction" select="'next'"/>
  375. </xsl:call-template>
  376. </a>
  377. </xsl:if>
  378. </td>
  379. </tr>
  380. </xsl:if>
  381. <xsl:if test="$row2">
  382. <tr>
  383. <td width="40%" align="{$direction.align.start}" valign="top">
  384. <xsl:if test="$navig.showtitles != 0">
  385. <xsl:apply-templates select="$prev" mode="object.title.markup"/>
  386. </xsl:if>
  387. <xsl:text>&#160;</xsl:text>
  388. </td>
  389. <td width="20%" align="center">
  390. <xsl:choose>
  391. <xsl:when test="$home != . or $nav.context = 'toc'">
  392. <a accesskey="h">
  393. <xsl:attribute name="href">
  394. <xsl:call-template name="href.target">
  395. <xsl:with-param name="object" select="$home"/>
  396. </xsl:call-template>
  397. </xsl:attribute>
  398. <xsl:call-template name="navig.content">
  399. <xsl:with-param name="direction" select="'home'"/>
  400. </xsl:call-template>
  401. </a>
  402. <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
  403. <xsl:text>&#160;|&#160;</xsl:text>
  404. </xsl:if>
  405. </xsl:when>
  406. <xsl:otherwise>&#160;</xsl:otherwise>
  407. </xsl:choose>
  408. <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
  409. <a accesskey="t">
  410. <xsl:attribute name="href">
  411. <xsl:value-of select="$chunked.filename.prefix"/>
  412. <xsl:apply-templates select="/*[1]"
  413. mode="recursive-chunk-filename">
  414. <xsl:with-param name="recursive" select="true()"/>
  415. </xsl:apply-templates>
  416. <xsl:text>-toc</xsl:text>
  417. <xsl:value-of select="$html.ext"/>
  418. </xsl:attribute>
  419. <xsl:call-template name="gentext">
  420. <xsl:with-param name="key" select="'nav-toc'"/>
  421. </xsl:call-template>
  422. </a>
  423. </xsl:if>
  424. </td>
  425. <td width="40%" align="{$direction.align.end}" valign="top">
  426. <xsl:text>&#160;</xsl:text>
  427. <xsl:if test="$navig.showtitles != 0">
  428. <xsl:apply-templates select="$next" mode="object.title.markup"/>
  429. </xsl:if>
  430. </td>
  431. </tr>
  432. </xsl:if>
  433. </table>
  434. -->
  435. <xsl:choose>
  436. <xsl:when test="count($up)&gt;0
  437. and generate-id($up) != generate-id($root)">
  438. <p>
  439. Up: <a accesskey="u">
  440. <xsl:attribute name="href">
  441. <xsl:call-template name="href.target">
  442. <xsl:with-param name="object" select="$up"/>
  443. </xsl:call-template>
  444. </xsl:attribute>
  445. <xsl:apply-templates select="$up" mode="object.title.markup"/>
  446. </a>
  447. </p>
  448. </xsl:when>
  449. <xsl:when test="count($up)&gt;0
  450. and generate-id($up) = generate-id($root)
  451. and generate-id(.) != generate-id($home)">
  452. <p>
  453. Up: <a accesskey="u">
  454. <xsl:attribute name="href">
  455. <xsl:call-template name="href.target">
  456. <xsl:with-param name="object" select="$home"/>
  457. </xsl:call-template>
  458. </xsl:attribute>
  459. <xsl:apply-templates select="$up" mode="object.title.markup"/>
  460. </a>
  461. </p>
  462. </xsl:when>
  463. </xsl:choose>
  464. <xsl:if test="count($xprev)>0">
  465. <p>
  466. Previous: <a accesskey="p">
  467. <xsl:attribute name="href">
  468. <xsl:call-template name="href.target">
  469. <xsl:with-param name="object" select="$xprev"/>
  470. </xsl:call-template>
  471. </xsl:attribute>
  472. <xsl:apply-templates select="$xprev" mode="object.title.markup"/>
  473. </a>
  474. </p>
  475. </xsl:if>
  476. <xsl:if test="count($xnext)>0">
  477. <p>
  478. Next: <a accesskey="n">
  479. <xsl:attribute name="href">
  480. <xsl:call-template name="href.target">
  481. <xsl:with-param name="object" select="$xnext"/>
  482. </xsl:call-template>
  483. </xsl:attribute>
  484. <xsl:apply-templates select="$xnext" mode="object.title.markup"/>
  485. </a>
  486. </p>
  487. </xsl:if>
  488. <!--
  489. <xsl:if test="count($rprev)>0">
  490. <p>
  491. Previous page: <a accesskey="n">
  492. <xsl:attribute name="href">
  493. <xsl:call-template name="href.target">
  494. <xsl:with-param name="object" select="$rprev"/>
  495. </xsl:call-template>
  496. </xsl:attribute>
  497. <xsl:apply-templates select="$rprev" mode="object.title.markup"/>
  498. </a>
  499. </p>
  500. </xsl:if>
  501. <xsl:if test="count($rnext)>0">
  502. <p>
  503. Next page: <a accesskey="n">
  504. <xsl:attribute name="href">
  505. <xsl:call-template name="href.target">
  506. <xsl:with-param name="object" select="$rnext"/>
  507. </xsl:call-template>
  508. </xsl:attribute>
  509. <xsl:apply-templates select="$rnext" mode="object.title.markup"/>
  510. </a>
  511. </p>
  512. </xsl:if>
  513. -->
  514. </div>
  515. </xsl:template>
  516. </xsl:stylesheet>