Скорее к знатока XSL

#
Скорее к знатока XSL
Нужно в шаблон передавать элементы с определенным значением свойства, вопрос как. Я пробую вот так
<xsl:apply-templates select="item[property[@id=135]/value = 1]" />

и вот так
<xsl:apply-templates select="item[/shop/item/propertys/property[@id=135]/value = 1]" />

но не работает. Это магазин. Может кто знает ( очень нужно.
http://www.colibre.ru - Создание и продвижение сайтов
Модератор
#
Re: Скорее к знатока XSL
libertine,
а фрагмент XML с item-ом и вот этим св-вом 135 покажите
#
Re: Скорее к знатока XSL
Вот, этого думаю хватит. Первый без свойства, второй со свойством.
<?xml version="1.0" encoding="windows-1251"?>
<shop id="1" current_group_id="0">
   <properties_for_group>
      <property id="135" parent_id="0" xml_name="secial">
         <property_name>Спец. предложение</property_name>
         <shop_list_of_properties_type>7</shop_list_of_properties_type>
         <property_show_kind>4</property_show_kind>
      </property>
   </properties_for_group>
   <count_items>146</count_items>
   <current_page>0</current_page>
   <item id="430" group="647">
      <captcha_key>77564</captcha_key>
      <name>LG FB-D163X</name>
      <show_count>0</show_count>
      <saller>0</saller>
      <marking_of_goods>G00100030293</marking_of_goods>
      <description>80W/ch, DVD/DivX/Mp3/WMA, USB Plus, Portable Audio in(Cable), 2 Mic Jack, 1Mic+200songs free</description>
      <date>30.11.1999</date>
      <datetime>30.11.1999 00:00:00</datetime>
      <time>00:00:00</time>
      <putoff_date>00.00.0000 00:00:00</putoff_date>
      <putend_date>00.00.0000 00:00:00</putend_date>
      <type>0</type>
      <weight>0</weight>
      <weight_mesure>г</weight_mesure>
      <rest>9</rest>
      <mesure></mesure>
      <shop_tax_id>0</shop_tax_id>
      <price>5830.00</price>
      <price_tax>5830.00</price_tax>
      <price_discount>5830.00</price_discount>
      <item_currency>руб.</item_currency>
      <currency>руб.</currency>
      <is_active>1</is_active>
      <order>0</order>
      <path>item_430</path>
      <fullpath>group_616/group_641/group_647/</fullpath>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <indexation>1</indexation>
      <vendorCode></vendorCode>
      <user_id></user_id>
      <shop_special_prices>
      </shop_special_prices>
   </item>
   <item id="296" group="619">
      <captcha_key>97310</captcha_key>
      <name>JVC AV-2941QBE Black (RUS)</name>
      <show_count>1</show_count>
      <saller>0</saller>
      <marking_of_goods>G00100030074</marking_of_goods>
      <description>ЭЛТ-телевизор с плоским экраном, 29&quot;, 4:3, прогрессивная развертка, мощность звука 20 Вт</description>
      <date>30.11.1999</date>
      <datetime>30.11.1999 00:00:00</datetime>
      <time>00:00:00</time>
      <putoff_date>00.00.0000 00:00:00</putoff_date>
      <putend_date>00.00.0000 00:00:00</putend_date>
      <type>0</type>
      <weight>0</weight>
      <weight_mesure>г</weight_mesure>
      <rest>1</rest>
      <mesure></mesure>
      <shop_tax_id>0</shop_tax_id>
      <price>7731.00</price>
      <price_tax>8590.00</price_tax>
      <price_discount>7731.00</price_discount>
      <discount>
         <name>Первомайская скидка</name>
         <value>10</value>
      </discount>
      <item_currency>руб.</item_currency>
      <currency>руб.</currency>
      <is_active>1</is_active>
      <order>0</order>
      <path>item_296</path>
      <fullpath>group_616/group_617/group_619/</fullpath>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <indexation>1</indexation>
      <vendorCode></vendorCode>
      <user_id>0</user_id>
      <property id="134" dir_id="0" xml_name="power">
         <name>Суммарная мощность колонок (Вт)</name>
         <xml_name>power</xml_name>
         <type>0</type>
         <order>0</order>
         <prefics></prefics>
         <value></value>
      </property>
      <property id="135" dir_id="0" xml_name="secial">
         <name>Спец. предложение</name>
         <xml_name>secial</xml_name>
         <type>7</type>
         <order>0</order>
         <prefics></prefics>
         <value>1</value>
      </property>
      <tags>
         <tag id="49">
            <tag_name>телевизор</tag_name>
            <tag_description></tag_description>
            <tag_path_name>%F2%E5%EB%E5%E2%E8%E7%EE%F0</tag_path_name>
         </tag>
      </tags>
      <shop_special_prices>
      </shop_special_prices>
   </item>
</shop>
http://www.colibre.ru - Создание и продвижение сайтов
#
Re: Скорее к знатока XSL
Первый вызов с данным xml-ом должен работать.

Попробуйте вызвать шаблон без предикат:
<xsl:apply-templates select="item" />

И посмотреть на результат.
#
Re: Скорее к знатока XSL
Да, поняла в чем была проблема, у меня это свойство стояло у тех товаров, которые располагались на страницах дальше, вот он и не выводил ничего. Спасибо большое за помощь!
http://www.colibre.ru - Создание и продвижение сайтов
Авторизация