html.xsl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version='1.0'?>
  2. <!-- This file wraps around the DocBook HTML XSL stylesheet to customise
  3. - some parameters; add the CSS stylesheet, etc.
  4. -->
  5. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. version='1.0'
  7. xmlns="http://www.w3.org/TR/xhtml1/transitional"
  8. exclude-result-prefixes="#default">
  9. <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
  10. <xsl:variable name="html.stylesheet">manual.css</xsl:variable>
  11. <!-- for sections with id attributes, use the id in the filename.
  12. This produces meaningful (and persistent) URLs for the sections. -->
  13. <xsl:variable name="use.id.as.filename" select="1"/>
  14. <!-- enable the shaded verbatim (programlisting etc) blocks. -->
  15. <!-- <xsl:variable name="shade.verbatim" select="1"/> -->
  16. <!-- add class="programlisting" attribute on the <pre>s from
  17. <programlisting>s so that the CSS can style them nicely. -->
  18. <xsl:attribute-set name="shade.verbatim.style">
  19. <xsl:attribute name="class">programlisting</xsl:attribute>
  20. </xsl:attribute-set>
  21. <!-- use sane ANSI C function prototypes -->
  22. <xsl:variable name="funcsynopsis.style" select="'ansi'"/>
  23. <!-- split each sect1 into a separate chunk -->
  24. <xsl:variable name="chunk.first.sections" select="1"/>
  25. <!-- don't generate table of contents within each chapter chunk. -->
  26. <xsl:variable name="generate.chapter.toc" select="0"/>
  27. <xsl:variable name="generate.appendix.toc" select="0"/>
  28. <!-- don't include manual page numbers in refentry cross-references, they
  29. look weird -->
  30. <xsl:variable name="refentry.xref.manvolnum" select="0"/>
  31. <!-- do generate variablelist's as tables -->
  32. <xsl:variable name="variablelist.as.table" select="1"/>
  33. <!-- and css'ize the tables so they can look pretty -->
  34. <xsl:variable name="table.borders.with.css" select="1"/>
  35. <!-- disable ugly tabular output -->
  36. <xsl:variable name="funcsynopsis.tabular.threshold" select="99999"/>
  37. <!-- change some presentation choices -->
  38. <xsl:template match="type">
  39. <xsl:call-template name="inline.italicseq"/>
  40. </xsl:template>
  41. <xsl:template match="parameter">
  42. <xsl:call-template name="inline.monoseq"/>
  43. </xsl:template>
  44. <!-- enclose the whole funcprototype in <code> -->
  45. <xsl:template match="funcprototype" mode="ansi-nontabular">
  46. <div class="funcprototype"><code>
  47. <xsl:apply-templates mode="ansi-nontabular"/>
  48. </code></div>
  49. </xsl:template>
  50. </xsl:stylesheet>