почему то не выводится меню ((

#
почему то не выводится меню ((
XSLT:

<?xml version="1.0" encoding="windows-1251"?>
<!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="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
   <xsl:template match="/document">
      <ul class="menu">
         <!-- Выбираем узлы структуры первого уровня -->
         <xsl:apply-templates select="structure[show=1]"/>
      </ul>
   </xsl:template>
   <xsl:template match="structure">
      <!-- Запишем в константу ID структуры, данные для которой будут выводиться
      пользователю -->
      <xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
      <li>
         <xsl:if test="current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1">
            <xsl:attribute name="class">current parent</xsl:attribute>
         </xsl:if>
         
         
         <!-- Показывать ссылку, или нет -->
         <xsl:choose>
            <xsl:when test="show_link = 1">
               <!-- Определяем адрес ссылки -->
               <xsl:variable name="link">
                  <xsl:value-of disable-output-escaping="yes" select="link"/>
               </xsl:variable>
               <a href="{$link}"><span class="link-1"><span>
                        <xsl:value-of disable-output-escaping="yes" select="name"/>
               </span></span></a>
            </xsl:when>
            <!-- Если не показывать ссылку - выводим просто имя ссылки -->
            <xsl:otherwise>
               <xsl:value-of disable-output-escaping="yes" select="name"/>
            </xsl:otherwise>
         </xsl:choose>
         <xsl:if test="count(structure[show=1]) > 0 and current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1">
            <ul class="submenu">
               <xsl:apply-templates select="structure[show=1]" />
            </ul>
         </xsl:if>
      </li>
   </xsl:template>
</xsl:stylesheet>


XML:

<?xml version="1.0" encoding="UTF-8"?>
<document>
   <site site_id="2">
      <site_name>Ксайт</site_name>
      <site_coding>UTF-8</site_coding>
      <site_locale>ru_RU.utf8</site_locale>
      <site_timezone></site_timezone>
      <site_chmod>0755</site_chmod>
      <site_files_chmod>0644</site_files_chmod>
      <site_date_format>%d.%m.%Y</site_date_format>
      <site_date_time_format>%d.%m.%Y %H:%M:%S</site_date_time_format>
      <site_html_cache_clear_probability>10000</site_html_cache_clear_probability>
      <alias alias_id="3" alias_current="0">
         <alias_name>ke2.ru</alias_name>
      </alias>
      <alias alias_id="4" alias_current="1">
         <alias_name>ke2.swteh.ru</alias_name>
      </alias>
   </site>
   <structure id="100" menu_id="5">
      <current_structure_id>99</current_structure_id>
      <name>О КОМПАНИИ</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title>О КОМПАНИИ</structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>1</structure_order>
      <structure_path_name>/</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <structure id="97" menu_id="5">
         <current_structure_id>99</current_structure_id>
         <name>История завода</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>100</id_parent>
         <structure_title>История завода</structure_title>
         <structure_description></structure_description>
         <structure_keywords></structure_keywords>
         <structure_order>0</structure_order>
         <structure_path_name>history</structure_path_name>
         <structure_type>0</structure_type>
         <structure_access>0</structure_access>
         <structure_allow_indexation>1</structure_allow_indexation>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/history/</link>
         <structure_change_frequency>0</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
      </structure>
   </structure>
   <structure id="99" menu_id="5">
      <current_structure_id>99</current_structure_id>
      <name>ПРЕСС-ЦЕНТР</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title>СМИ  о нас</structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>2</structure_order>
      <structure_path_name>press</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/press/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <structure id="98" menu_id="5">
         <current_structure_id>99</current_structure_id>
         <name>СМИ о нас</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>99</id_parent>
         <structure_title>СМИ о нас</structure_title>
         <structure_description></structure_description>
         <structure_keywords></structure_keywords>
         <structure_order>0</structure_order>
         <structure_path_name>press-about-us</structure_path_name>
         <structure_type>0</structure_type>
         <structure_access>0</structure_access>
         <structure_allow_indexation>1</structure_allow_indexation>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/press/press-about-us/</link>
         <structure_change_frequency>0</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
      </structure>
   </structure>
</document>


эм вообщем пропускал через xslt процессор все отлично выводится,
на странице пусто. Где не так делаю ?
#
Re: почему то не выводится меню ((
Gasoid, сдается мне, что у вас HostCMS уже на UTF-8, а XSL-шаблон от win1251-версии.
Попробуйте заменить заголовок шаблона на такой:
<?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"/>
Заказов не беру. Консультирую редко.
#
Re: почему то не выводится меню ((
Спасибо, отлично!
#
Re: почему то не выводится меню ((
Пожалуйста
Заказов не беру. Консультирую редко.
Авторизация