lfs-legalnotice.xsl 3.7 KB

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