2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:template match="/">
10 <xsl:apply-templates/>
17 <xsl:template match="class">
18 <h2>Class: <xsl:value-of select="name"/></h2>
19 <h3>Inherits from: <xsl:value-of select="inheritfull"/></h3>
21 <xsl:for-each select="attribute">
22 <xsl:value-of select="."/><xsl:if test="position()!=last()">, </xsl:if>
27 <h4>Constructors:</h4>
28 <xsl:apply-templates select="member" mode="constructors">
29 <xsl:sort select="name"/>
30 </xsl:apply-templates>
32 <xsl:apply-templates select="member" mode="methods">
33 <xsl:sort select="name"/>
34 </xsl:apply-templates>
36 <xsl:apply-templates select="member" mode="properties">
37 <xsl:sort select="name"/>
38 </xsl:apply-templates>
41 <xsl:template match="member" mode="constructors">
42 <xsl:if test="type='constructor'">
43 <xsl:value-of select="name"/>(<xsl:apply-templates select="param"/>)<br/>
45 <xsl:apply-templates select="attribute"/>
46 <xsl:apply-templates select="inheritfull"/>
51 <xsl:template match="member" mode="methods">
52 <xsl:if test="type='method'">
53 <xsl:value-of select="name"/>(<xsl:apply-templates select="param"/>)<br/>
55 <xsl:apply-templates select="attribute"/>
56 <xsl:apply-templates select="inheritfull"/>
57 <xsl:apply-templates select="return"/>
62 <xsl:template match="member" mode="properties">
63 <xsl:if test="type='property'">
64 <xsl:value-of select="name"/><br/>
66 <xsl:apply-templates select="attribute"/>
67 <xsl:apply-templates select="inheritfull"/>
68 <xsl:apply-templates select="property"/>
73 <xsl:template match="param">
74 <xsl:value-of select="type"/>  <xsl:value-of select="name"/>
75 <xsl:if test="position()!=last()">, </xsl:if>
78 <xsl:template match="attribute">
79 <xsl:if test="position() = 1"><dd>Attributes:</dd></xsl:if>
81 <dd><xsl:value-of select="."/></dd>
86 <xsl:template match="inheritfull">
87 <xsl:if test="position() = 1"><dd>Inherits from:</dd></xsl:if>
89 <dd><xsl:value-of select="."/></dd>
94 <xsl:template match="return">
95 <xsl:if test="position() = 1"><dd>Return Type:</dd></xsl:if>
97 <dd><xsl:value-of select="."/></dd>
102 <xsl:template match="property">
103 <xsl:if test="position() = 1"><dd>Property:</dd></xsl:if>
105 <dd><xsl:value-of select="."/></dd>