docclass.xsl 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <xsl:stylesheet
  2. version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:php="http://php.net/xsl"
  5. xmlns:ipub="http://www.ipublisher.nl/4.0"
  6. xmlns:exsl="http://exslt.org/common"
  7. xmlns:str="http://exslt.org/strings"
  8. xmlns:date="http://exslt.org/dates-and-times"
  9. extension-element-prefixes="str exsl date"
  10. >
  11. <xsl:include href="str.replace.function.xsl"/>
  12. <xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" media-type="text/html"/>
  13. <xsl:template match="/model">
  14. <html>
  15. <head>
  16. <title>Webservice Helper</title>
  17. <link rel="stylesheet" href="css/doc.css" type="text/css" ></link>
  18. </head>
  19. <body>
  20. <div id="main">
  21. <div id="mainheader">
  22. <div id="mainheaderpadded">
  23. <xsl:if test="class != ''">
  24. <h1><xsl:value-of select="class/name" /> <a href="?class={class/name}&amp;wsdl">&#160;[WSDL]</a></h1>
  25. </xsl:if>
  26. </div>
  27. </div>
  28. <div id="mainpadded">
  29. <table cellpadding="0" cellspacing="0">
  30. <tr>
  31. <td id="menu">
  32. <h2>Classes</h2>
  33. <xsl:for-each select="/model/menu/*">
  34. <a href="?class={name}"><xsl:value-of select="name"/></a><br />
  35. </xsl:for-each>
  36. </td>
  37. <td id="content">
  38. <xsl:if test="fault != ''">
  39. <xsl:value-of select="fault" />
  40. </xsl:if>
  41. <xsl:if test="class != '' and not(fault)">
  42. <h2>Full description</h2>
  43. <p><xsl:value-of select="class/fullDescription" /></p>
  44. <h2>Properties</h2>
  45. <xsl:for-each select="class/properties/*">
  46. <a name="property_{name}"></a>
  47. <div class="property{warning}">
  48. <b><xsl:value-of select="name" /></b><br />
  49. <xsl:choose>
  50. <xsl:when test="type != ''">
  51. <xsl:choose>
  52. <xsl:when test="contains('int,boolean,double,float,string,void', type)">
  53. <i>type <xsl:value-of select="type" /></i><br />
  54. </xsl:when>
  55. <xsl:otherwise>
  56. <i>type <a href="?class={str:replace(type,'[]','')}"><xsl:value-of select="type" /></a></i><br />
  57. </xsl:otherwise>
  58. </xsl:choose>
  59. </xsl:when>
  60. <xsl:otherwise>
  61. <div class='warning'><img src='images/doc/warning.gif'/> missing type info</div><br />
  62. </xsl:otherwise>
  63. </xsl:choose>
  64. <xsl:value-of select="fullDescription" />
  65. </div>
  66. </xsl:for-each>
  67. <h2>Methods</h2>
  68. <xsl:for-each select="class/methods/*">
  69. <a name="method_{name}"></a>
  70. <div class="method{warning}">
  71. <b><xsl:value-of select="name" /></b>(
  72. <xsl:for-each select="params/*">
  73. <xsl:value-of select="name"/>
  74. <xsl:if test="position() != last()">,</xsl:if>
  75. </xsl:for-each>
  76. )
  77. <br />
  78. <xsl:choose>
  79. <xsl:when test="return != ''">
  80. <xsl:choose>
  81. <xsl:when test="contains('int,boolean,double,float,string,void', return)">
  82. <i>returns <xsl:value-of select="return" /></i><br />
  83. </xsl:when>
  84. <xsl:otherwise>
  85. <i>returns <a href="?class={str:replace(return,'[]','')}"><xsl:value-of select="return" /></a></i><br />
  86. </xsl:otherwise>
  87. </xsl:choose>
  88. </xsl:when>
  89. <xsl:otherwise>
  90. <div class='warning'><img src='images/doc/warning.gif'/> missing return value</div><br />
  91. </xsl:otherwise>
  92. </xsl:choose>
  93. <xsl:choose>
  94. <xsl:when test="throws != ''">
  95. <i>throws <xsl:value-of select="throws" /></i><br />
  96. </xsl:when>
  97. </xsl:choose>
  98. <xsl:value-of select="fullDescription" /><br />
  99. </div>
  100. </xsl:for-each>
  101. </xsl:if>
  102. </td>
  103. </tr>
  104. </table>
  105. </div>
  106. <div id="mainfooter"><img src="images/doc/backbottom.jpg" /></div>
  107. </div>
  108. </body>
  109. </html>
  110. </xsl:template>
  111. </xsl:stylesheet>