division.xsl 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" encoding="ASCII"?>
  2. <!--This file was created automatically by html2xhtml-->
  3. <!--from the HTML stylesheets.-->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
  5. <!-- ********************************************************************
  6. $Id$
  7. ********************************************************************
  8. This file is part of the XSL DocBook Stylesheet distribution.
  9. See ../README or http://docbook.sf.net/release/xsl/current/ for
  10. copyright and other information.
  11. ******************************************************************** -->
  12. <!-- ==================================================================== -->
  13. <xsl:template match="set">
  14. <xsl:call-template name="id.warning"/>
  15. <div>
  16. <xsl:apply-templates select="." mode="class.attribute"/>
  17. <xsl:call-template name="dir">
  18. <xsl:with-param name="inherit" select="1"/>
  19. </xsl:call-template>
  20. <xsl:call-template name="language.attribute"/>
  21. <xsl:if test="$generate.id.attributes != 0">
  22. <xsl:attribute name="id">
  23. <xsl:call-template name="object.id"/>
  24. </xsl:attribute>
  25. </xsl:if>
  26. <xsl:call-template name="set.titlepage"/>
  27. <xsl:variable name="toc.params">
  28. <xsl:call-template name="find.path.params">
  29. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  30. </xsl:call-template>
  31. </xsl:variable>
  32. <xsl:call-template name="make.lots">
  33. <xsl:with-param name="toc.params" select="$toc.params"/>
  34. <xsl:with-param name="toc">
  35. <xsl:call-template name="set.toc">
  36. <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
  37. </xsl:call-template>
  38. </xsl:with-param>
  39. </xsl:call-template>
  40. <xsl:apply-templates/>
  41. </div>
  42. </xsl:template>
  43. <xsl:template match="set/setinfo"/>
  44. <xsl:template match="set/title"/>
  45. <xsl:template match="set/titleabbrev"/>
  46. <xsl:template match="set/subtitle"/>
  47. <!-- ==================================================================== -->
  48. <xsl:template match="book">
  49. <xsl:call-template name="id.warning"/>
  50. <div>
  51. <xsl:apply-templates select="." mode="class.attribute"/>
  52. <xsl:call-template name="dir">
  53. <xsl:with-param name="inherit" select="1"/>
  54. </xsl:call-template>
  55. <xsl:call-template name="language.attribute"/>
  56. <xsl:if test="$generate.id.attributes != 0">
  57. <xsl:attribute name="id">
  58. <xsl:call-template name="object.id"/>
  59. </xsl:attribute>
  60. </xsl:if>
  61. <xsl:call-template name="book.titlepage"/>
  62. <xsl:apply-templates select="dedication" mode="dedication"/>
  63. <xsl:variable name="toc.params">
  64. <xsl:call-template name="find.path.params">
  65. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  66. </xsl:call-template>
  67. </xsl:variable>
  68. <xsl:call-template name="make.lots">
  69. <xsl:with-param name="toc.params" select="$toc.params"/>
  70. <xsl:with-param name="toc">
  71. <xsl:call-template name="division.toc">
  72. <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
  73. </xsl:call-template>
  74. </xsl:with-param>
  75. </xsl:call-template>
  76. <xsl:apply-templates/>
  77. </div>
  78. </xsl:template>
  79. <xsl:template match="book/bookinfo"/>
  80. <xsl:template match="book/info"/>
  81. <xsl:template match="book/title"/>
  82. <xsl:template match="book/titleabbrev"/>
  83. <xsl:template match="book/subtitle"/>
  84. <!-- ==================================================================== -->
  85. <xsl:template match="part">
  86. <xsl:call-template name="id.warning"/>
  87. <div>
  88. <xsl:apply-templates select="." mode="class.attribute"/>
  89. <xsl:call-template name="dir">
  90. <xsl:with-param name="inherit" select="1"/>
  91. </xsl:call-template>
  92. <xsl:call-template name="language.attribute"/>
  93. <xsl:if test="$generate.id.attributes != 0">
  94. <xsl:attribute name="id">
  95. <xsl:call-template name="object.id"/>
  96. </xsl:attribute>
  97. </xsl:if>
  98. <xsl:call-template name="part.titlepage"/>
  99. <xsl:variable name="toc.params">
  100. <xsl:call-template name="find.path.params">
  101. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  102. </xsl:call-template>
  103. </xsl:variable>
  104. <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
  105. <xsl:call-template name="division.toc"/>
  106. </xsl:if>
  107. <xsl:apply-templates/>
  108. </div>
  109. </xsl:template>
  110. <xsl:template match="part" mode="make.part.toc">
  111. <xsl:call-template name="division.toc"/>
  112. </xsl:template>
  113. <xsl:template match="reference" mode="make.part.toc">
  114. <xsl:call-template name="division.toc"/>
  115. </xsl:template>
  116. <xsl:template match="part/docinfo"/>
  117. <xsl:template match="part/partinfo"/>
  118. <xsl:template match="part/info"/>
  119. <xsl:template match="part/title"/>
  120. <xsl:template match="part/titleabbrev"/>
  121. <xsl:template match="part/subtitle"/>
  122. <xsl:template match="partintro">
  123. <xsl:call-template name="id.warning"/>
  124. <div>
  125. <xsl:apply-templates select="." mode="class.attribute"/>
  126. <xsl:call-template name="dir">
  127. <xsl:with-param name="inherit" select="1"/>
  128. </xsl:call-template>
  129. <xsl:call-template name="language.attribute"/>
  130. <xsl:if test="$generate.id.attributes != 0">
  131. <xsl:attribute name="id">
  132. <xsl:call-template name="object.id"/>
  133. </xsl:attribute>
  134. </xsl:if>
  135. <xsl:call-template name="partintro.titlepage"/>
  136. <xsl:apply-templates/>
  137. <xsl:variable name="toc.params">
  138. <xsl:call-template name="find.path.params">
  139. <xsl:with-param name="node" select="parent::*"/>
  140. <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
  141. </xsl:call-template>
  142. </xsl:variable>
  143. <xsl:if test="contains($toc.params, 'toc')">
  144. <!-- not ancestor::part because partintro appears in reference -->
  145. <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
  146. </xsl:if>
  147. <xsl:call-template name="process.footnotes"/>
  148. </div>
  149. </xsl:template>
  150. <xsl:template match="partintro/title"/>
  151. <xsl:template match="partintro/titleabbrev"/>
  152. <xsl:template match="partintro/subtitle"/>
  153. <xsl:template match="partintro/title" mode="partintro.title.mode">
  154. <h2>
  155. <xsl:apply-templates/>
  156. </h2>
  157. </xsl:template>
  158. <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
  159. <h3>
  160. <i><xsl:apply-templates/></i>
  161. </h3>
  162. </xsl:template>
  163. <!-- ==================================================================== -->
  164. <xsl:template match="book" mode="division.number">
  165. <xsl:number from="set" count="book" format="1."/>
  166. </xsl:template>
  167. <xsl:template match="part" mode="division.number">
  168. <xsl:number from="book" count="part" format="I."/>
  169. </xsl:template>
  170. <!-- ==================================================================== -->
  171. <xsl:template name="division.title">
  172. <xsl:param name="node" select="."/>
  173. <h1>
  174. <xsl:attribute name="class">title</xsl:attribute>
  175. <xsl:if test="$generate.id.attributes = 0">
  176. <xsl:call-template name="anchor">
  177. <xsl:with-param name="node" select="$node"/>
  178. <xsl:with-param name="conditional" select="0"/>
  179. </xsl:call-template>
  180. </xsl:if>
  181. <xsl:apply-templates select="$node" mode="object.title.markup">
  182. <xsl:with-param name="allow-anchors" select="1"/>
  183. </xsl:apply-templates>
  184. </h1>
  185. </xsl:template>
  186. </xsl:stylesheet>