lfs-legalnotice.xsl 3.1 KB

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