code.xsl 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="html" media-type="text/html; charset=ISO-8859-1" />
  4. <xsl:include href="./util.xsl" />
  5. <xsl:template match="/">
  6. <html>
  7. <head>
  8. <title>OpenGL Mathematics: Code</title>
  9. <meta http-equiv="Content-Language" content="en" />
  10. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
  11. <meta name="copyright" content="G-Truc Creation" />
  12. <link href="./common/style.css" rel="stylesheet" media="screen, print, embossed" type="text/css" />
  13. <script type="text/javascript">
  14. var _gaq = _gaq || [];
  15. _gaq.push(['_setAccount', 'UA-20182250-1']);
  16. _gaq.push(['_setDomainName', '.g-truc.net']);
  17. _gaq.push(['_trackPageview']);
  18. (function() {
  19. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  20. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  21. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  22. })();
  23. </script>
  24. </head>
  25. <body>
  26. <table>
  27. <tr>
  28. <td class="menu">
  29. <xsl:apply-templates select="./glm/menu" />
  30. </td>
  31. <td class="page">
  32. <!--div class="title1">OpenGL Mathematics</div-->
  33. <div class="title1"><img src="./common/title.png" alt="OpenGL Mathematics" /></div>
  34. <xsl:apply-templates select="./glm/about-short" />
  35. <br />
  36. <xsl:apply-templates select="./glm/codes/code" />
  37. <div class="title3">
  38. <xsl:value-of select="./glm/@copyright" /> <a href="http://www.g-truc.net">G-Truc Creation</a>
  39. </div>
  40. </td>
  41. </tr>
  42. </table>
  43. </body>
  44. </html>
  45. </xsl:template>
  46. <!--
  47. <xsl:template match="code">
  48. <div>
  49. <xsl:apply-templates select="./include" />
  50. <br />
  51. <xsl:apply-templates select="./function" />
  52. </div>
  53. </xsl:template>
  54. <xsl:template match="comment">
  55. <div class="comment"><xsl:apply-templates select="." /></div>
  56. </xsl:template>
  57. <xsl:template match="include">
  58. <div class="include">
  59. <xsl:if test="contains(./@type, 'system')">
  60. #include <![CDATA[<]]><xsl:value-of select="./@file" /><![CDATA[>]]>
  61. </xsl:if>
  62. <xsl:if test="contains(./@type, 'local')">
  63. #include <![CDATA["]]><xsl:value-of select="./@file" /><![CDATA["]]>
  64. </xsl:if>
  65. </div>
  66. </xsl:template>
  67. <xsl:template match="function">
  68. <div>
  69. <xsl:value-of select="./@return" /><xsl:text> </xsl:text>
  70. <xsl:value-of select="./@name" />(<xsl:apply-templates select="./parameters" />)
  71. </div>
  72. <xsl:apply-templates select="./content" />
  73. <br />
  74. </xsl:template>
  75. <xsl:template match="content">
  76. <xsl:apply-templates select="./block" />
  77. </xsl:template>
  78. <xsl:template match="parameter">
  79. <xsl:value-of select="./@type" /> <xsl:value-of select="./@name" />
  80. <xsl:text> </xsl:text>
  81. </xsl:template>
  82. <xsl:template match="block">
  83. {
  84. <div class="block">
  85. <xsl:apply-templates />
  86. </div>
  87. }
  88. </xsl:template>
  89. <xsl:template match="line">
  90. <div>
  91. <xsl:apply-templates />
  92. </div>
  93. </xsl:template>
  94. <xsl:template match="key">
  95. <spam class="key"><xsl:apply-templates select="." /></spam>
  96. </xsl:template>
  97. -->
  98. </xsl:stylesheet>