lfs-chunked.xsl 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version='1.0'?>
  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. <!-- We use XHTML -->
  6. <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
  7. <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
  8. <!-- The CSS Stylesheet -->
  9. <xsl:param name="html.stylesheet" select="'../stylesheets/lfs.css'"/>
  10. <!-- Include our customised templates -->
  11. <xsl:include href="xhtml/lfs-toc.xsl"/>
  12. <xsl:include href="xhtml/lfs-index.xsl"/>
  13. <!-- Use graphics in admonitions -->
  14. <xsl:param name="admon.graphics" select="1"/>
  15. <xsl:param name="admon.graphics.path">../images/</xsl:param>
  16. <xsl:param name="admon.graphics.extension" select="'.png'"/>
  17. <!-- Legal Notice stuff -->
  18. <xsl:param name="generate.legalnotice.link" select="1"/>
  19. <xsl:template match="legalnotice" mode="titlepage.mode">
  20. <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  21. <xsl:choose>
  22. <xsl:when test="$generate.legalnotice.link != 0">
  23. <xsl:variable name="filename">
  24. <xsl:call-template name="make-relative-filename">
  25. <xsl:with-param name="base.dir" select="''"/>
  26. <xsl:with-param name="base.name" select="concat($base.dir, 'prologue/legalnotice.html')"/>
  27. </xsl:call-template>
  28. </xsl:variable>
  29. <xsl:variable name="title">
  30. <xsl:apply-templates select="." mode="title.markup"/>
  31. </xsl:variable>
  32. <xsl:element name="a">
  33. <xsl:attribute name="href">
  34. <xsl:value-of select="'prologue/legalnotice.html'"/>
  35. </xsl:attribute>
  36. <xsl:copy-of select="$title"/>
  37. </xsl:element>
  38. <xsl:call-template name="write.chunk">
  39. <xsl:with-param name="filename" select="$filename"/>
  40. <xsl:with-param name="quiet" select="$chunk.quietly"/>
  41. <xsl:with-param name="content">
  42. <html>
  43. <head>
  44. <xsl:call-template name="system.head.content"/>
  45. <xsl:call-template name="head.content"/>
  46. <xsl:call-template name="user.head.content"/>
  47. </head>
  48. <body>
  49. <xsl:call-template name="body.attributes"/>
  50. <div class="{local-name(.)}">
  51. <xsl:apply-templates mode="titlepage.mode"/>
  52. </div>
  53. </body>
  54. </html>
  55. </xsl:with-param>
  56. </xsl:call-template>
  57. </xsl:when>
  58. <xsl:otherwise>
  59. <div class="{local-name(.)}">
  60. <xsl:apply-templates mode="titlepage.mode"/>
  61. </div>
  62. </xsl:otherwise>
  63. </xsl:choose>
  64. </xsl:template>
  65. <!--TOC stuff-->
  66. <xsl:param name="generate.toc">
  67. appendix toc
  68. book toc,title,figure,table,example,equation
  69. chapter nop
  70. part toc
  71. preface nop
  72. qandadiv nop
  73. qandaset nop
  74. reference nop
  75. sect1 nop
  76. sect2 nop
  77. sect3 nop
  78. sect4 nop
  79. sect5 nop
  80. section nop
  81. set nop
  82. </xsl:param>
  83. <xsl:param name="toc.section.depth">1</xsl:param>
  84. <xsl:param name="toc.max.depth">3</xsl:param>
  85. </xsl:stylesheet>