Оберните в условие:
<xsl:if test="count(*[@id][link/node() or url/node()]) = 0">
<span><xsl:text> → </xsl:text></span>
<!-- Показывать ссылку? -->
<xsl:choose>
<xsl:when test="(show = 1 or active/node() and active = 1) and count(*[@id][link/node() or url/node()]) > 0">
<a href="{$link}">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>