Разобрался
<!-- Сравнение товаров
<xsl:variable name="shop_item_id" select="@id" />
<div class="compare" onclick="return $.addCompare('{/shop/url}', {@id}, this)">
<xsl:if test="/shop/comparing/shop_item[@id = $shop_item_id]/node()">
<xsl:attribute name="class">compare current</xsl:attribute>
</xsl:if>
</div>
Избранное
<div class="favorite" onclick="return $.addFavorite('{/shop/url}', {@id}, this)">
<xsl:if test="/shop/favorite/shop_item[@id = $shop_item_id]/node()">
<xsl:attribute name="class">favorite favorite_current</xsl:attribute>
</xsl:if>
</div> -->