lfs-legalnotice.xsl 3.7 KB

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