Помогите, пожалуйста, разобраться. Что делаю не так? Не присваивается класс актив к пункту меню ИС. Если можно объясните, пожалуйста, подробнее.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<--Макет-->
<?php
$oInformationsystem = Core_Entity::factory('Informationsystem', Core_Array::get(Core_Page::instance()->libParams, 'informationsystemId'

);
$Informationsystem_Controller_Show = new Informationsystem_Controller_Show($oInformationsystem);
$Informationsystem_Controller_Show
->xsl(
Core_Entity::factory('Xsl'

->getByName('тестменю'

)
->limit(50)
->show();
if (is_object(Core_Page::instance()->object)
&& get_class(Core_Page::instance()->object) == 'Informationsystem_Controller_Show'

{
$Informationsystem_Controller_Show->addEntity(
Core::factory('Core_Xml_Entity'

->name('informationsystem_group_id'

->value(intval(Core_Page::instance()->object->group))
)->addEntity(
Core::factory('Core_Xml_Entity'

->name('informationsystem_item_id'

->value(intval(Core_Page::instance()->object->item))
);
}
?>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!--xsl-шаблон меню-->
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:hostcms="http://www.hostcms.ru/"
exclude-result-prefixes="hostcms">
<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:variable name="current_structure_id" select="/informationsystem/current_structure_id"/>
<xsl:template match="/informationsystem">
<ul>
<xsl:apply-templates select="informationsystem_item"/>
</ul>
</xsl:template>
<xsl:template match="informationsystem_item">
<li>
<xsl:if test="$current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1">
<xsl:attribute name="class">active</xsl:attribute>
</xsl:if>
<!-- Определяем адрес ссылки -->
<xsl:variable name="link">
<xsl:choose>
<!-- Если внешняя ссылка -->
<xsl:when test="url != ''">
<xsl:value-of disable-output-escaping="yes" select="url"/>
</xsl:when>
<!-- Иначе если внутренняя ссылка -->
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="link"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Ссылка на пункт меню -->
<a title="{name}" href="{url}"><xsl:value-of select="name" /></a>
</li>
</xsl:template>
</xsl:stylesheet>