Прошу пояснить знающих людей. Есть 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="/">
<xsl:apply-templates select="shop"/>
</xsl:template>
<xsl:template match="shop">
<xsl:apply-templates select="group"/>
</xsl:template>
<xsl:template match="group">
<xsl:value-of disable-output-escaping="yes" select="name"/>
<br/>
</xsl:template>
</xsl:stylesheet>
и есть XML файл:
<?xml version="1.0" encoding="windows-1251"?>
<shop id="7" current_group_id="0">
<ТекущаяГруппа>605</ТекущаяГруппа>
<name>Абсолют</name>
<description></description>
<path>/katalog/</path>
<site_id>1</site_id>
<shop_image_small_max_width>100</shop_image_small_max_width>
<shop_image_big_max_width>800</shop_image_big_max_width>
<shop_image_small_max_height>100</shop_image_small_max_height>
<shop_image_big_max_height>800</shop_image_big_max_height>
<structure_id>82</structure_id>
<shop_country_id>175</shop_country_id>
<shop_currency id="1">
<shop_currency_name>руб.</shop_currency_name>
<shop_currency_international_name>RUR</shop_currency_international_name>
<shop_currency_value_in_basic_currency>1.000000</shop_currency_value_in_basic_currency>
<shop_currency_is_default>1.000000</shop_currency_is_default>
</shop_currency>
<shop_order_status id="0">
</shop_order_status>
<shop_mesures id="27">
<shop_mesures_name>шт</shop_mesures_name>
<shop_mesures_description>штука</shop_mesures_description>
</shop_mesures>
<shop_shops_send_order_mail_admin>1</shop_shops_send_order_mail_admin>
<shop_shops_send_order_mail_user>1</shop_shops_send_order_mail_user>
<shop_shops_admin_mail>ofis@abskom.ru</shop_shops_admin_mail>
<tags>
</tags>
<group id="604" parent="0">
<name>Монтажная пена</name>
<description></description>
<order>10</order>
<indexation>1</indexation>
<path>montazhnaja-pena</path>
<fullpath>montazhnaja-pena/</fullpath>
<count_items>0</count_items>
<count_groups>1</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>1</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
<group id="609" parent="604">
<name>Монтажная пена Tytan</name>
<description></description>
<order>0</order>
<indexation>1</indexation>
<path>montazhnaja-pena-tytan</path>
<fullpath>montazhnaja-pena/montazhnaja-pena-tytan/</fullpath>
<count_items>0</count_items>
<count_groups>0</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>0</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
</group>
</group>
<group id="606" parent="0">
<name>Силиконы</name>
<description></description>
<order>20</order>
<indexation>1</indexation>
<path>silikony</path>
<fullpath>silikony/</fullpath>
<count_items>0</count_items>
<count_groups>0</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>0</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
</group>
<group id="605" parent="0">
<name>Герметики</name>
<description></description>
<order>30</order>
<indexation>1</indexation>
<path>germetiki</path>
<fullpath>germetiki/</fullpath>
<count_items>0</count_items>
<count_groups>2</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>2</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
<group id="611" parent="605">
<name>Герметики Penosil</name>
<description></description>
<order>0</order>
<indexation>1</indexation>
<path>germetiki-penosil</path>
<fullpath>germetiki/germetiki-penosil/</fullpath>
<count_items>0</count_items>
<count_groups>0</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>0</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
</group>
<group id="610" parent="605">
<name>Герметики TYTAN</name>
<description></description>
<order>0</order>
<indexation>1</indexation>
<path>germetiki-tytan</path>
<fullpath>germetiki/germetiki-tytan/</fullpath>
<count_items>0</count_items>
<count_groups>0</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>0</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
</group>
</group>
<group id="607" parent="0">
<name>Клеи</name>
<description></description>
<order>40</order>
<indexation>1</indexation>
<path>klei</path>
<fullpath>klei/</fullpath>
<count_items>0</count_items>
<count_groups>0</count_groups>
<count_all_items>0</count_all_items>
<count_all_groups>0</count_all_groups>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<propertys>
</propertys>
</group>
<sallers>
</sallers>
<properties_for_group>
</properties_for_group>
<count_items>0</count_items>
<current_page>0</current_page>
<items_on_page>10</items_on_page>
</shop>
Вопрос: Почему выводятся названия только тех group, для которых parent=0, по идее должен выводить все group...даже те у которых parent отличен от нуля. Как задать условие чтобы вывести все?