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