Skip to content
This repository was archived by the owner on Nov 22, 2019. It is now read-only.

Commit cc6de48

Browse files
committed
Fix for issues 72 and 86
When traits were added, somewhere the word 'interfaces' remained during copy paste, instead of 'traits'. Also the variable fqnn is added, and [@namespace=$parent_name] is changed into [@namespace=$fqnn] in template match="namespace" mode="sidebar-nav". This way the links for classes, interfaces and constants will show up in the sidebar.
1 parent ece3788 commit cc6de48

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

elements/namespace.xsl

+7-6
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109

110110
<xsl:template match="namespace" mode="sidebar-nav">
111111
<xsl:param name="parent_name" select="@full_name"/>
112+
<xsl:variable name="fqnn" select="concat($parent_name, @name)" />
112113

113114
<div class="btn-group view pull-right" data-toggle="buttons-radio">
114115
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
@@ -122,39 +123,39 @@
122123
<xsl:with-param name="parent_name" select="$parent_name"/>
123124
</xsl:apply-templates>
124125

125-
<xsl:variable name="functions" select="/project/file/function[@namespace=$parent_name]"/>
126+
<xsl:variable name="functions" select="/project/file/function[@namespace=$fqnn]"/>
126127
<xsl:if test="count($functions) > 0">
127128
<li class="nav-header"><i title="Functions" class="icon-custom icon-function"></i> Functions</li>
128129
<xsl:apply-templates select="$functions" mode="sidebar">
129130
<xsl:sort select="name" />
130131
</xsl:apply-templates>
131132
</xsl:if>
132133

133-
<xsl:variable name="traits" select="/project/file/trait[@namespace=$parent_name]"/>
134-
<xsl:if test="count($interfaces) > 0">
134+
<xsl:variable name="traits" select="/project/file/trait[@namespace=$fqnn]"/>
135+
<xsl:if test="count($traits) > 0">
135136
<li class="nav-header"><i title="Traits" class="icon-custom icon-trait"></i> Traits</li>
136137
<xsl:for-each select="$traits">
137138
<li><a href="#{name}" title="{docblock/description}"><xsl:value-of select="name" /></a></li>
138139
</xsl:for-each>
139140
</xsl:if>
140141

141-
<xsl:variable name="interfaces" select="/project/file/interface[@namespace=$parent_name]"/>
142+
<xsl:variable name="interfaces" select="/project/file/interface[@namespace=$fqnn]"/>
142143
<xsl:if test="count($interfaces) > 0">
143144
<li class="nav-header"><i title="Interfaces" class="icon-custom icon-interface"></i> Interfaces</li>
144145
<xsl:for-each select="$interfaces">
145146
<li><a href="#{name}" title="{docblock/description}"><xsl:value-of select="name" /></a></li>
146147
</xsl:for-each>
147148
</xsl:if>
148149

149-
<xsl:variable name="classes" select="/project/file/class[@namespace=$parent_name]"/>
150+
<xsl:variable name="classes" select="/project/file/class[@namespace=$fqnn]"/>
150151
<xsl:if test="count($classes) > 0">
151152
<li class="nav-header"><i title="Classes" class="icon-custom icon-class"></i> Classes</li>
152153
<xsl:for-each select="$classes">
153154
<li><a href="#{name}" title="{docblock/description}"><xsl:value-of select="name" /></a></li>
154155
</xsl:for-each>
155156
</xsl:if>
156157

157-
<xsl:variable name="constants" select="/project/file/constant[@namespace=$parent_name]"/>
158+
<xsl:variable name="constants" select="/project/file/constant[@namespace=$fqnn]"/>
158159
<xsl:if test="count($constants) > 0">
159160
<li class="nav-header"><i title="Constants" class="icon-custom icon-constant"></i> Constants</li>
160161
<xsl:apply-templates select="$constants" mode="sidebar">

0 commit comments

Comments
 (0)