-
Notifications
You must be signed in to change notification settings - Fork 22
/
classFileDebug.xsl
109 lines (98 loc) · 2.82 KB
/
classFileDebug.xsl
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
<?xml version="1.0"?>
<!--
A stylesheet to format the xml representation of the object model
generated by Tahiti.
$Id$
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="class|interface">
<html>
<head>
<title><xsl:value-of select="@name"/></title>
</head>
<body>
<xsl:value-of select="local-name(.)"/>
<xsl:text> </xsl:text>
<xsl:call-template name="stripPrefix">
<xsl:with-param name="str" select="@name"/>
</xsl:call-template>
<xsl:text> : </xsl:text>
<xsl:for-each select="extends|implements">
<xsl:if test="position()!=1">
<xsl:text>, </xsl:text>
</xsl:if>
<br/>
<span style="width:5em"> </span>
<a href="{@name}.xml" title="{@name}">
<xsl:call-template name="stripPrefix">
<xsl:with-param name="str" select="@name"/>
</xsl:call-template>
</a>
</xsl:for-each>
<br/>
<xsl:text>{</xsl:text>
<br/>
<table style="margin-left:2em">
<xsl:for-each select="field">
<tr style="margin-top:0.5em; margin-bottom:0.5em">
<td>
<a href="{@itemType}.xml" title="{@itemType}">
<xsl:call-template name="stripPrefix">
<xsl:with-param name="str" select="@itemType"/>
</xsl:call-template>
<xsl:if test="@maxOccurs!=0 and @maxOccurs!=1">
<xsl:text>[]</xsl:text>
</xsl:if>
</a>
</td>
<td style="padding-left:1em; padding-right:5em">
<xsl:value-of select="@name"/>
</td>
<td style="font-size:smaller">
<xsl:text>// (</xsl:text>
<xsl:value-of select="@minOccurs"/>
<xsl:text>,</xsl:text>
<xsl:choose>
<xsl:when test="@maxOccurs='unbounded'">
<xsl:text>*</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@maxOccurs"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>)</xsl:text>
</td>
</tr>
</xsl:for-each>
</table>
<xsl:text>}</xsl:text>
<br/>
<hr/>
<p>
<xsl:text>Derived types : </xsl:text>
<xsl:for-each select="info/derivedTypes/*">
<xsl:text> </xsl:text>
<a href="{@name}.xml" title="{@name}">
<xsl:call-template name="stripPrefix">
<xsl:with-param name="str" select="@name"/>
</xsl:call-template>
</a>
</xsl:for-each>
</p>
</body>
</html>
</xsl:template>
<xsl:template name="stripPrefix">
<xsl:param name="str"/>
<xsl:choose>
<xsl:when test="contains($str,'.')">
<xsl:call-template name="stripPrefix">
<xsl:with-param name="str" select="substring-after($str,'.')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$str"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>