devhelp.xsl 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  3. xmlns="http://www.devhelp.net/book"
  4. xmlns:exsl="http://exslt.org/common"
  5. xmlns:str="http://exslt.org/strings"
  6. extension-element-prefixes="exsl str"
  7. exclude-result-prefixes="exsl str">
  8. <!-- The stylesheet for the html pages -->
  9. <xsl:import href="html.xsl"/>
  10. <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  11. <!-- Build keys for all symbols -->
  12. <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
  13. <xsl:template match="/api">
  14. <book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
  15. <xsl:apply-templates select="files"/>
  16. <xsl:apply-templates select="symbols"/>
  17. </book>
  18. <xsl:call-template name="generate_index"/>
  19. <xsl:call-template name="generate_general"/>
  20. </xsl:template>
  21. <xsl:template match="/api/files">
  22. <chapters>
  23. <sub name="API" link="general.html">
  24. <xsl:apply-templates select="file"/>
  25. </sub>
  26. </chapters>
  27. </xsl:template>
  28. <xsl:template match="/api/files/file">
  29. <xsl:variable name="module" select="@name"/>
  30. <xsl:variable name="prev" select="string(preceding-sibling::file[position()=1]/@name)"/>
  31. <xsl:variable name="next" select="string(following-sibling::file[position()=1]/@name)"/>
  32. <sub name="{@name}" link="libxml2-{@name}.html"/>
  33. <xsl:document xmlns="" href="libxml2-{@name}.html" method="xml" indent="yes" encoding="UTF-8">
  34. <html>
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  37. <title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
  38. <meta name="generator" content="Libxml2 devhelp stylesheet"/>
  39. <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
  40. <link rel="up" href="general.html" title="API"/>
  41. <link rel="stylesheet" href="style.css" type="text/css"/>
  42. <link rel="chapter" href="general.html" title="API"/>
  43. </head>
  44. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  45. <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
  46. <tr valign="middle">
  47. <xsl:if test="$prev != ''">
  48. <td><a accesskey="p" href="libxml2-{$prev}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"/></a></td>
  49. </xsl:if>
  50. <td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
  51. <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
  52. <xsl:if test="$next != ''">
  53. <td><a accesskey="n" href="libxml2-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
  54. </xsl:if>
  55. <th width="100%" align="center">libxml2 Reference Manual</th>
  56. </tr>
  57. </table>
  58. <h2><span class="refentrytitle"><xsl:value-of select="@name"/></span></h2>
  59. <p><xsl:value-of select="@name"/> - <xsl:value-of select="summary"/></p>
  60. <p><xsl:value-of select="description"/></p>
  61. <xsl:if test="deprecated">
  62. <p> WARNING: this module is deprecated !</p>
  63. </xsl:if>
  64. <p>Author(s): <xsl:value-of select="author"/></p>
  65. <div class="refsynopsisdiv">
  66. <h2>Synopsis</h2>
  67. <pre class="synopsis">
  68. <xsl:apply-templates mode="synopsis" select="exports"/>
  69. </pre>
  70. </div>
  71. <div class="refsect1" lang="en">
  72. <h2>Description</h2>
  73. </div>
  74. <div class="refsect1" lang="en">
  75. <h2>Details</h2>
  76. <div class="refsect2" lang="en">
  77. <xsl:apply-templates mode="details" select="/api/symbols/macro[@file=$module]"/>
  78. <xsl:apply-templates mode="details" select="/api/symbols/typedef[@file=$module] | /api/symbols/struct[@file=$module]"/>
  79. <xsl:apply-templates mode="details" select="/api/symbols/functype[@file=$module]"/>
  80. <xsl:apply-templates mode="details" select="/api/symbols/variable[@file=$module]"/>
  81. <xsl:apply-templates mode="details" select="/api/symbols/function[@file=$module]"/>
  82. </div>
  83. </div>
  84. </body>
  85. </html>
  86. </xsl:document>
  87. </xsl:template>
  88. <xsl:template match="/api/symbols">
  89. <functions>
  90. <xsl:apply-templates select="macro"/>
  91. <xsl:apply-templates select="enum"/>
  92. <xsl:apply-templates select="typedef"/>
  93. <xsl:apply-templates select="struct"/>
  94. <xsl:apply-templates select="functype"/>
  95. <xsl:apply-templates select="variable"/>
  96. <xsl:apply-templates select="function"/>
  97. </functions>
  98. </xsl:template>
  99. <xsl:template match="/api/symbols/functype">
  100. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  101. </xsl:template>
  102. <xsl:template match="/api/symbols/function">
  103. <function name="{@name} ()" link="libxml2-{@file}.html#{@name}"/>
  104. </xsl:template>
  105. <xsl:template match="/api/symbols/typedef">
  106. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  107. </xsl:template>
  108. <xsl:template match="/api/symbols/enum">
  109. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  110. </xsl:template>
  111. <xsl:template match="/api/symbols/struct">
  112. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  113. </xsl:template>
  114. <xsl:template match="/api/symbols/macro">
  115. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  116. </xsl:template>
  117. <xsl:template match="/api/symbols/variable">
  118. <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
  119. </xsl:template>
  120. </xsl:stylesheet>