For some reason, the first xsl:for-each is working fine, but the second one (which seems identical to me) returns nothing:
<xsl:template match="methods">
<li><xsl:value-of select="@name"/> (<xsl:for-each select="params">
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>)
<ul>
<li class="text">
<h1>
<xsl:value-of select="@name"/> (<xsl:for-each select="params">
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>)
</h1>
<p>
<xsl:value-of select="@short"/>
</p>
<p>Parameters</p>
<ul>
<xsl:for-each select="params">
<li>
<xsl:value-of select="@name"/> (<xsl:value-of select="@type"/>): <xsl:value-of select="desc"/>
</li>
</xsl:for-each>
</ul>
</li>
</ul></li>
</xsl:template>
Sample XML:
<methods short='Adds each of the Elements in the array to the set of matched elements.' type='jQuery' name='add' cat='jQuery'>
<params type='Array<Element>' name='els'>
<desc>An array of Elements to add</desc>
</params>
<desc>Adds each of the Elements in the array to the set of matched elements.
This is used to add a set of Elements to a jQuery object.</desc>
<examples>
<code>$("p").add([document.getElementById("a"), document.getElementById("b")])</code>
<result>[ <p>Hello</p>, <span id="a">Hello Again</span>, <span id="b">And Again</span> ]</result>
<before><p>Hello</p><p><span id="a">Hello Again</span><span id="b">And Again</span></p></before>
</examples>
</methods>