lfs-titles.xsl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. <xsl:template name="part.titlepage">
  6. <div class="titlepage">
  7. <h1 class="{name(.)}">
  8. <xsl:value-of select="title"/>
  9. </h1>
  10. </div>
  11. </xsl:template>
  12. <xsl:template name="chapter.titlepage">
  13. <div class="titlepage">
  14. <h1 class="{name(.)}">
  15. <xsl:value-of select="title"/>
  16. </h1>
  17. </div>
  18. </xsl:template>
  19. <xsl:template name="preface.titlepage">
  20. <div class="titlepage">
  21. <h1 class="{name(.)}">
  22. <xsl:value-of select="title"/>
  23. </h1>
  24. </div>
  25. </xsl:template>
  26. <xsl:template name="sect1.titlepage">
  27. <xsl:choose>
  28. <!-- I should find a better test -->
  29. <xsl:when test="position() = 4">
  30. <div class="titlepage">
  31. <xsl:if test="@id">
  32. <a id="{@id}" name="{@id}"/>
  33. </xsl:if>
  34. <h2 class="{name(.)}">
  35. <xsl:value-of select="title"/>
  36. </h2>
  37. </div>
  38. </xsl:when>
  39. <xsl:otherwise>
  40. <div class="titlepage">
  41. <h1 class="{name(.)}">
  42. <xsl:value-of select="title"/>
  43. </h1>
  44. </div>
  45. </xsl:otherwise>
  46. </xsl:choose>
  47. </xsl:template>
  48. <xsl:template name="sect2.titlepage">
  49. <xsl:choose>
  50. <xsl:when test="string-length(title) = 0"/>
  51. <xsl:otherwise>
  52. <div class="titlepage">
  53. <xsl:if test="@id">
  54. <a id="{@id}" name="{@id}"/>
  55. </xsl:if>
  56. <h2 class="{name(.)}">
  57. <xsl:value-of select="title"/>
  58. </h2>
  59. </div>
  60. </xsl:otherwise>
  61. </xsl:choose>
  62. </xsl:template>
  63. <xsl:template name="dedication.titlepage">
  64. <div class="titlepage">
  65. <h2 class="{name(.)}">
  66. <xsl:value-of select="title"/>
  67. </h2>
  68. </div>
  69. </xsl:template>
  70. </xsl:stylesheet>