lfs-legalnotice.xsl 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <!--
  3. $LastChangedBy$
  4. $Date$
  5. -->
  6. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  7. xmlns="http://www.w3.org/1999/xhtml"
  8. version="1.0">
  9. <!-- This stylesheet controls how legalnotice page is created -->
  10. <!-- Generating the legalnotice page:
  11. We are forcing separate legalnotice page generation.
  12. Removed the default link to legalnotice page. We want it in Copyright.
  13. Added footer navigational link to Home. -->
  14. <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
  15. <xsl:template match="legalnotice" mode="titlepage.mode">
  16. <xsl:variable name="id">
  17. <xsl:call-template name="object.id"/>
  18. </xsl:variable>
  19. <xsl:variable name="filename" select="concat($base.dir, 'legalnotice.html')"/>
  20. <xsl:call-template name="write.chunk">
  21. <xsl:with-param name="filename" select="$filename"/>
  22. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  23. <xsl:with-param name="content">
  24. <html>
  25. <xsl:call-template name="html.head"/>
  26. <body>
  27. <xsl:call-template name="body.attributes"/>
  28. <div class="{local-name(.)}">
  29. <xsl:apply-templates mode="titlepage.mode"/>
  30. </div>
  31. <div class="navfooter">
  32. <ul class="footerlinks">
  33. <li class="home">
  34. <a accesskey="h" href="index.html">
  35. <xsl:attribute name="title">
  36. <xsl:value-of select="/book/bookinfo/title"/>
  37. <xsl:text> - </xsl:text>
  38. <xsl:value-of select="/book/bookinfo/subtitle"/>
  39. </xsl:attribute>
  40. <xsl:call-template name="navig.content">
  41. <xsl:with-param name="direction" select="'home'"/>
  42. </xsl:call-template>
  43. </a>
  44. </li>
  45. </ul>
  46. </div>
  47. </body>
  48. </html>
  49. </xsl:with-param>
  50. </xsl:call-template>
  51. </xsl:template>
  52. <!-- Making the legalnotice link:
  53. We make the "Copyright" word a link to legalnotice page. -->
  54. <!-- The original template is in {docbook-xsl}/xhtml/titlepage.xsl -->
  55. <xsl:template match="copyright" mode="titlepage.mode">
  56. <p class="{name(.)}">
  57. <a href="legalnotice.html">
  58. <xsl:call-template name="gentext">
  59. <xsl:with-param name="key" select="'Copyright'"/>
  60. </xsl:call-template>
  61. </a>
  62. <xsl:call-template name="gentext.space"/>
  63. <xsl:call-template name="dingbat">
  64. <xsl:with-param name="dingbat">copyright</xsl:with-param>
  65. </xsl:call-template>
  66. <xsl:call-template name="gentext.space"/>
  67. <xsl:call-template name="copyright.years">
  68. <xsl:with-param name="years" select="year"/>
  69. <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
  70. <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
  71. </xsl:call-template>
  72. <xsl:call-template name="gentext.space"/>
  73. <xsl:apply-templates select="holder" mode="titlepage.mode"/>
  74. </p>
  75. </xsl:template>
  76. </xsl:stylesheet>