PageRenderTime 55ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/jars/QuickNotepad/users-guide.xsl

#
Extensible Stylesheet Language Transformations | 283 lines | 244 code | 39 blank | 0 comment | 0 complexity | 86fb839e60f03f9ee5ac46c76fc07d06 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. version='1.0'
  4. xmlns="http://www.w3.org/TR/xhtml1/transitional"
  5. exclude-result-prefixes="#default">
  6. <!-- NOTE: the following element must point to the location of onechunk.xsl -->
  7. <!-- (for a single html page) or chunk.xsl (for multiple pages) in your -->
  8. <!-- installation of the DocBook XSL stylesheets. -->
  9. <xsl:import href="I:/sgml/docbook-xsl-1.45/html/onechunk.xsl"/>
  10. <xsl:param name="use.id.as.filename" select="'1'" doc:type="boolean"/>
  11. <!-- Change these variables to '1' when using xalan -->
  12. <xsl:param name="use.extensions" select="'0'" doc:type="boolean"/>
  13. <xsl:param name="tablecolumns.extension" select="'0'" doc:type="boolean"/>
  14. <xsl:template match="guibutton">
  15. <xsl:call-template name="inline.sansserifseq"/>
  16. </xsl:template>
  17. <xsl:template match="guiicon">
  18. <xsl:call-template name="inline.sansserifseq"/>
  19. </xsl:template>
  20. <xsl:template match="guilabel">
  21. <xsl:call-template name="inline.sansserifseq"/>
  22. </xsl:template>
  23. <xsl:template match="guimenu">
  24. <xsl:call-template name="inline.sansserifseq"/>
  25. </xsl:template>
  26. <xsl:template match="guimenuitem">
  27. <xsl:call-template name="inline.sansserifseq"/>
  28. </xsl:template>
  29. <xsl:template match="guisubmenu">
  30. <xsl:call-template name="inline.sansserifseq"/>
  31. </xsl:template>
  32. <xsl:template match="keycap">
  33. <xsl:call-template name="inline.sansserifseq"/>
  34. </xsl:template>
  35. <xsl:template match="keypress">
  36. <xsl:call-template name="inline.sansserifseq"/>
  37. </xsl:template>
  38. <xsl:template name="inline.sansserifseq">
  39. <xsl:param name="content">
  40. <xsl:call-template name="anchor"/>
  41. <xsl:apply-templates/>
  42. </xsl:param>
  43. <font face="Arial,Helvetica" size="-1">
  44. <strong><xsl:copy-of select="$content"/></strong>
  45. </font>
  46. </xsl:template>
  47. <xsl:template match="keycombo">
  48. <xsl:variable name="action" select="@action"/>
  49. <xsl:variable name="joinchar">
  50. <xsl:choose>
  51. <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
  52. <xsl:when test="$action='simul'">+</xsl:when>
  53. <xsl:when test="$action='press'">-</xsl:when>
  54. <xsl:when test="$action='click'">-</xsl:when>
  55. <xsl:when test="$action='double-click'">-</xsl:when>
  56. <xsl:when test="$action='other'"></xsl:when>
  57. <xsl:otherwise>-</xsl:otherwise>
  58. </xsl:choose>
  59. </xsl:variable>
  60. <xsl:for-each select="./*">
  61. <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
  62. <xsl:call-template name="inline.sansserifseq"/>
  63. </xsl:for-each>
  64. </xsl:template>
  65. <xsl:variable name="shade.verbatim">1</xsl:variable>
  66. <xsl:variable name="funcsynopsis.style">ansi</xsl:variable>
  67. <xsl:template match="void"><xsl:apply-templates/></xsl:template>
  68. <xsl:variable name="toc.list.type">ul</xsl:variable>
  69. <xsl:param name="local.l10n.xml" select="document('')"/>
  70. <!-- Swing HTML control doesn't support &ldquo; and &rdquo; -->
  71. <i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0">
  72. <l10n language="en">
  73. <dingbat key="startquote" text="&quot;"/>
  74. <dingbat key="endquote" text="&quot;"/>
  75. <dingbat key="nestedstartquote" text="&apos;"/>
  76. <dingbat key="nestedendquote" text="&apos;"/>
  77. </l10n>
  78. </i18n>
  79. <xsl:template match="/">
  80. <xsl:call-template name="toc"/>
  81. <xsl:call-template name="index"/>
  82. </xsl:template>
  83. <xsl:template name="header.navigation">
  84. </xsl:template>
  85. <xsl:template name="footer.navigation">
  86. </xsl:template>
  87. <xsl:template name="toc">
  88. <xsl:apply-templates/>
  89. <xsl:call-template name="write.chunk">
  90. <xsl:with-param name="filename" select="'toc.xml'"/>
  91. <xsl:with-param name="method" select="'xml'"/>
  92. <xsl:with-param name="indent" select="'yes'"/>
  93. <xsl:with-param name="content">
  94. <xsl:call-template name="toc.content"/>
  95. </xsl:with-param>
  96. </xsl:call-template>
  97. </xsl:template>
  98. <xsl:template name="toc.content">
  99. <TOC>
  100. <xsl:apply-templates select="." mode="my.toc"/>
  101. </TOC>
  102. </xsl:template>
  103. <xsl:template match="set" mode="my.toc">
  104. <ENTRY>
  105. <xsl:attribute name="href">
  106. <xsl:apply-templates mode="chunk-filename" select="."/>
  107. </xsl:attribute>
  108. <TITLE>
  109. <xsl:apply-templates mode="title.markup" select="."/>
  110. </TITLE>
  111. <xsl:apply-templates select="book" mode="my.toc"/>
  112. </ENTRY>
  113. </xsl:template>
  114. <xsl:template match="book" mode="my.toc">
  115. <ENTRY>
  116. <xsl:attribute name="href">
  117. <xsl:apply-templates mode="chunk-filename" select="."/>
  118. </xsl:attribute>
  119. <TITLE>
  120. <xsl:apply-templates mode="title.markup" select="."/>
  121. </TITLE>
  122. <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
  123. mode="my.toc"/>
  124. </ENTRY>
  125. </xsl:template>
  126. <xsl:template match="part|reference|preface|chapter|appendix|article"
  127. mode="my.toc">
  128. <ENTRY>
  129. <xsl:attribute name="HREF">
  130. <xsl:apply-templates mode="chunk-filename" select="."/>
  131. </xsl:attribute>
  132. <TITLE>
  133. <xsl:apply-templates mode="title.markup" select="."/>
  134. </TITLE>
  135. <xsl:apply-templates
  136. select="preface|chapter|appendix|refentry|section|sect1"
  137. mode="my.toc"/>
  138. </ENTRY>
  139. </xsl:template>
  140. <xsl:template match="section" mode="my.toc">
  141. <ENTRY>
  142. <xsl:attribute name="href">
  143. <xsl:apply-templates mode="chunk-filename" select="."/>
  144. </xsl:attribute>
  145. <TITLE>
  146. <xsl:apply-templates mode="title.markup" select="."/>
  147. </TITLE>
  148. <xsl:apply-templates select="section" mode="my.toc"/>
  149. </ENTRY>
  150. </xsl:template>
  151. <xsl:template match="sect1" mode="my.toc">
  152. <ENTRY>
  153. <xsl:attribute name="HREF">
  154. <xsl:apply-templates mode="chunk-filename" select="."/>
  155. </xsl:attribute>
  156. <TITLE>
  157. <xsl:apply-templates mode="title.markup" select="."/>
  158. </TITLE>
  159. <xsl:apply-templates select="sect2" mode="my.toc"/>
  160. </ENTRY>
  161. </xsl:template>
  162. <xsl:template match="sect2" mode="my.toc">
  163. <ENTRY>
  164. <xsl:attribute name="HREF">
  165. <xsl:apply-templates mode="chunk-filename" select="."/>
  166. </xsl:attribute>
  167. <TITLE>
  168. <xsl:apply-templates mode="title.markup" select="."/>
  169. </TITLE>
  170. <xsl:apply-templates select="sect3" mode="my.toc"/>
  171. </ENTRY>
  172. </xsl:template>
  173. <xsl:template match="sect3" mode="my.toc">
  174. <ENTRY>
  175. <xsl:attribute name="HREF">
  176. <xsl:apply-templates mode="chunk-filename" select="."/>
  177. </xsl:attribute>
  178. <TITLE>
  179. <xsl:apply-templates mode="title.markup" select="."/>
  180. </TITLE>
  181. <xsl:apply-templates select="sect4" mode="my.toc"/>
  182. </ENTRY>
  183. </xsl:template>
  184. <xsl:template match="sect4" mode="my.toc">
  185. <ENTRY>
  186. <xsl:attribute name="HREF">
  187. <xsl:apply-templates mode="chunk-filename" select="."/>
  188. </xsl:attribute>
  189. <TITLE>
  190. <xsl:apply-templates mode="title.markup" select="."/>
  191. </TITLE>
  192. <xsl:apply-templates select="sect5" mode="my.toc"/>
  193. </ENTRY>
  194. </xsl:template>
  195. <xsl:template match="sect5|colophon" mode="my.toc">
  196. <ENTRY>
  197. <xsl:attribute name="HREF">
  198. <xsl:apply-templates mode="chunk-filename" select="."/>
  199. </xsl:attribute>
  200. <TITLE>
  201. <xsl:apply-templates mode="title.markup" select="."/>
  202. </TITLE>
  203. </ENTRY>
  204. </xsl:template>
  205. <xsl:template name="index">
  206. <xsl:call-template name="write.chunk">
  207. <xsl:with-param name="filename" select="'word-index.xml'"/>
  208. <xsl:with-param name="method" select="'xml'"/>
  209. <xsl:with-param name="indent" select="'yes'"/>
  210. <xsl:with-param name="content">
  211. <xsl:call-template name="index.content"/>
  212. </xsl:with-param>
  213. </xsl:call-template>
  214. </xsl:template>
  215. <xsl:template name="index.content">
  216. <INDEX>
  217. <xsl:apply-templates select="//indexterm" mode="index"/>
  218. </INDEX>
  219. </xsl:template>
  220. <xsl:template match="indexterm" mode="index">
  221. <xsl:variable name="text">
  222. <xsl:value-of select="primary"/>
  223. <xsl:if test="secondary">
  224. <xsl:text>, </xsl:text>
  225. <xsl:value-of select="secondary"/>
  226. </xsl:if>
  227. <xsl:if test="tertiary">
  228. <xsl:text>, </xsl:text>
  229. <xsl:value-of select="tertiary"/>
  230. </xsl:if>
  231. </xsl:variable>
  232. <xsl:choose>
  233. <xsl:when test="see">
  234. <xsl:variable name="see"><xsl:value-of select="see"/></xsl:variable>
  235. <INDEXTERM TEXT="{$text} see '{$see}'"/>
  236. </xsl:when>
  237. <xsl:otherwise>
  238. <INDEXTERM TEXT="{$text}">
  239. <xsl:apply-templates mode="chunk-filename" select="."/>
  240. </INDEXTERM>
  241. </xsl:otherwise>
  242. </xsl:choose>
  243. </xsl:template>
  244. </xsl:stylesheet>