blfs-chunked.xsl 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. <!-- LFS top-level chunk templates. -->
  10. <xsl:import href="lfs-chunked.xsl"/>
  11. <!-- The LFS book type to be processed (lfs, blfs, clfs, or hlfs) -->
  12. <xsl:param name="book-type">blfs</xsl:param>
  13. <!-- The CSS Stylesheets. We set here relative path from sub-dirs HTML files.
  14. The path from top-level HTML files (index.html, partX.html, etc) MUST be
  15. fixed via a sed in the Makefile-->
  16. <!-- Master CSS Stylesheet -->
  17. <xsl:param name="html.stylesheet" select="'../stylesheets/blfs.css'"/>
  18. <!-- Print CSS Stylesheet -->
  19. <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
  20. <xsl:template name='user.head.content'>
  21. <link rel="stylesheet" href="../stylesheets/blfs-print.css" type="text/css" media="print"/>
  22. </xsl:template>
  23. <!-- Are sections enumerated? 1 = yes, 0 = no -->
  24. <xsl:param name="section.autolabel" select="0"/>
  25. <!-- Do section labels include the component label? 1 = yes, 0 = no -->
  26. <xsl:param name="section.label.includes.component.label" select="0"/>
  27. <!-- Handle name and date in info section as a footnote -->
  28. <xsl:template name="process.footnotes">
  29. <xsl:variable name="footnotes" select=".//footnote"/>
  30. <xsl:variable name="fcount">
  31. <xsl:call-template name="count.footnotes.in.this.chunk">
  32. <xsl:with-param name="node" select="."/>
  33. <xsl:with-param name="footnotes" select="$footnotes"/>
  34. </xsl:call-template>
  35. </xsl:variable>
  36. <!-- Only bother to do this if there's at least one non-table footnote -->
  37. <xsl:if test="$fcount &gt; 0">
  38. <div class="footnotes">
  39. <br/>
  40. <hr width="100" align="left"/>
  41. <xsl:call-template name="process.footnotes.in.this.chunk">
  42. <xsl:with-param name="node" select="."/>
  43. <xsl:with-param name="footnotes" select="$footnotes"/>
  44. </xsl:call-template>
  45. </div>
  46. </xsl:if>
  47. <!-- Add this to the footnotes -->
  48. <xsl:apply-templates select='prefaceinfo|chapterinfo|sect1info|./sect1[1]/sect1info' mode='attribution'/>
  49. </xsl:template>
  50. <xsl:template match='prefaceinfo|chapterinfo|sect1info' mode='attribution'>
  51. <p class='updated'> Last updated <!-- by
  52. <xsl:apply-templates select="othername" mode='attribution'/> -->
  53. on
  54. <xsl:apply-templates select="date" mode='attribution'/>
  55. </p>
  56. </xsl:template>
  57. <xsl:template match='othername' mode='attribution'>
  58. <xsl:variable name='author'>
  59. <xsl:value-of select='.'/>
  60. </xsl:variable>
  61. <xsl:variable name='nameonly'>
  62. <xsl:value-of select='substring($author,16)'/>
  63. </xsl:variable>
  64. <xsl:value-of select="substring-before($nameonly,'$')" />
  65. </xsl:template>
  66. <xsl:template match='date' mode='attribution'>
  67. <xsl:variable name='date'>
  68. <xsl:value-of select='.'/>
  69. </xsl:variable>
  70. <xsl:value-of select="substring($date,7,26)" />
  71. </xsl:template>
  72. </xsl:stylesheet>