Are you looking for something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="currentPage">Sub-sub-foo1</xsl:param>
<xsl:template match="/">
Current page: <xsl:value-of select="$currentPage" /><br />
<ul>
<xsl:choose>
<xsl:when test="//menuitem[@name=$currentPage]">
<xsl:apply-templates select="//menuitem[@name=$currentPage]/.." />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</ul>
</xsl:template>
<xsl:template match="menuitem">
<li>
<xsl:choose>
<xsl:when test="@name=$currentPage">
<b><xsl:value-of select="@name" /></b>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name" />
</xsl:otherwise>
</xsl:choose>
<xsl:if test="menuitem">
<ul>
<xsl:apply-templates />
</ul>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
Rubens Farias
2009-10-13 13:17:05