Помогите пожалуйста. Есть меню -
http://enko.com.ua
Вот его шаблон:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
<xsl:template match="/">
<xsl:apply-templates select="shop"/>
</xsl:template>
<!-- Шаблон для магазина -->
<xsl:template match="/shop">
<SCRIPT>
<xsl:comment>
<xsl:text disable-output-escaping="yes">
<![CDATA[
function show_hide_menu(id)
{
if (obj = document.getElementById(id))
{
obj.style.display == 'none' ? obj.style.display = 'block' : obj.style.display = 'none';
return false;
}
return true;
}
function active(){
var obj = document.getElementById('active');
while (obj){
obj = obj.parentNode;
if(obj.tagName=='UL'){
obj.style.display='block';
act = obj.parentNode;
}
}
}
]]>
</xsl:text>
</xsl:comment>
</SCRIPT>
<xsl:variable name="parent_group_id" select="@current_group_id"/>
<!-- Выводим группы магазина -->
<ul class="left_menu">
<xsl:apply-templates select="//group[@parent=0]"/>
</ul>
</xsl:template>
<!-- Шаблон для групп товара -->
<xsl:template match="group">
<xsl:variable name="current_group_id" select="/shop/ТекущаяГруппа"/>
<li>
<xsl:if test="$current_group_id = @id">
<xsl:attribute name="id">active</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="$current_group_id = @id or count(.//group[@id=$current_group_id])=1">
<!-- Определяем стиль вывода ссылки -->
<xsl:variable name="link_style">
<xsl:choose>
<!-- Выделяем текущую страницу жирным (если это текущая страница) -->
<xsl:when test="$current_group_id = @id">font-weight: bold; background: url('/images/citembg.png') no-repeat 0 0;</xsl:when>
<!-- Иначе обычный вывод с пустым стилем -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a onClick="return show_hide_menu('{@id}');" href="{/shop/path}{fullpath}" style="{$link_style}">
<xsl:choose>
<xsl:when test="propertys/property/node()">
<xsl:value-of disable-output-escaping="yes" select="propertys/property/value"/></xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:otherwise>
</xsl:choose>
</a>
<!--
<xsl:if test="count_all_groups > 0">
<ul class="left_menu_2">
<xsl:apply-templates select="group"/>
</ul>
</xsl:if>
-->
</xsl:when>
<xsl:otherwise>
<a onClick="return show_hide_menu('{@id}');" href="{/shop/path}{fullpath}">
<xsl:choose>
<xsl:when test="propertys/property/node()">
<xsl:value-of disable-output-escaping="yes" select="propertys/property/value"/></xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:otherwise>
</xsl:choose>
</a>
</xsl:otherwise>
</xsl:choose>
<!-- Если есть подгруппы -->
<xsl:if test="group">
<ul id="{@id}" style="display: none;" class="left_menu_2">
<xsl:apply-templates select="group"/>
</ul>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
Нужно сделать так, чтобы в шаблоне третьему уровню присваивался свой стиль (к примеру - left_menu_3). Сам стиль я уже настроить смогу.
Не могу понять как это запрограммировать, подскажите плиз.