lfs-titles.xsl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <!-- Version 0.9- Manuel Canales Esparcia <macana@lfs-es.org> -->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns="http://www.w3.org/1999/xhtml"
  5. version="1.0">
  6. <xsl:template name="part.titlepage">
  7. <div class="titlepage">
  8. <h1 class="{name(.)}">
  9. <xsl:value-of select="title"/>
  10. </h1>
  11. </div>
  12. </xsl:template>
  13. <xsl:template name="chapter.titlepage">
  14. <div class="titlepage">
  15. <h1 class="{name(.)}">
  16. <xsl:value-of select="title"/>
  17. </h1>
  18. </div>
  19. </xsl:template>
  20. <xsl:template name="preface.titlepage">
  21. <div class="titlepage">
  22. <h1 class="{name(.)}">
  23. <xsl:value-of select="title"/>
  24. </h1>
  25. </div>
  26. </xsl:template>
  27. <xsl:template name="sect1.titlepage">
  28. <xsl:choose>
  29. <!-- I should find a better test -->
  30. <xsl:when test="position() = 4">
  31. <div class="titlepage">
  32. <xsl:if test="@id">
  33. <a id="{@id}" name="{@id}"/>
  34. </xsl:if>
  35. <h2 class="{name(.)}">
  36. <xsl:value-of select="title"/>
  37. </h2>
  38. </div>
  39. </xsl:when>
  40. <xsl:otherwise>
  41. <div class="titlepage">
  42. <h1 class="{name(.)}">
  43. <xsl:value-of select="title"/>
  44. </h1>
  45. </div>
  46. </xsl:otherwise>
  47. </xsl:choose>
  48. </xsl:template>
  49. <xsl:template name="sect2.titlepage">
  50. <xsl:choose>
  51. <xsl:when test="string-length(title) = 0"/>
  52. <xsl:otherwise>
  53. <div class="titlepage">
  54. <xsl:if test="@id">
  55. <a id="{@id}" name="{@id}"/>
  56. </xsl:if>
  57. <h3 class="{name(.)}">
  58. <xsl:value-of select="title"/>
  59. </h3>
  60. </div>
  61. </xsl:otherwise>
  62. </xsl:choose>
  63. </xsl:template>
  64. <xsl:template name="dedication.titlepage">
  65. <div class="titlepage">
  66. <h2 class="{name(.)}">
  67. <xsl:value-of select="title"/>
  68. </h2>
  69. </div>
  70. </xsl:template>
  71. </xsl:stylesheet>