Вывод тэгов html по дополнительному свойству
aikyaira,
Покажите XSL полностью
Покажите XSL полностью
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Seri,
<informationsystem id="22">
<informationsystem_dir_id>0</informationsystem_dir_id>
<structure_id>520</structure_id>
<site_id>2</site_id>
<name>Оплата</name>
<description></description>
<items_sorting_direction>0</items_sorting_direction>
<items_sorting_field>2</items_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<groups_sorting_field>0</groups_sorting_field>
<image_large_max_width>300</image_large_max_width>
<image_large_max_height>300</image_large_max_height>
<image_small_max_width>68</image_small_max_width>
<image_small_max_height>68</image_small_max_height>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<watermark_file></watermark_file>
<watermark_default_use_large_image>0</watermark_default_use_large_image>
<watermark_default_use_small_image>0</watermark_default_use_small_image>
<watermark_default_position_x>50%</watermark_default_position_x>
<watermark_default_position_y>100%</watermark_default_position_y>
<user_id>19</user_id>
<items_on_page>10</items_on_page>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<url_type>0</url_type>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>1</apply_tags_automatically>
<change_filename>1</change_filename>
<apply_keywords_automatically>0</apply_keywords_automatically>
<group_image_large_max_width>300</group_image_large_max_width>
<group_image_large_max_height>300</group_image_large_max_height>
<group_image_small_max_width>70</group_image_small_max_width>
<group_image_small_max_height>70</group_image_small_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<preserve_aspect_ratio_small>1</preserve_aspect_ratio_small>
<preserve_aspect_ratio_group>0</preserve_aspect_ratio_group>
<preserve_aspect_ratio_group_small>0</preserve_aspect_ratio_group_small>
<http>//iflat.ru</http>
<url>/payment/</url>
<captcha_id>54677</captcha_id>
<items_count>4</items_count>
<items_total_count>4</items_total_count>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<siteuser_id>0</siteuser_id>
<ОтображатьСсылкуНаАрхив>0</ОтображатьСсылкуНаАрхив>
<ОтображатьСсылкиНаСледующиеСтраницы>1</ОтображатьСсылкиНаСледующиеСтраницы>
<ТекущаяГруппа>0</ТекущаяГруппа>
<show_comments>0</show_comments>
<show_add_comments>0</show_add_comments>
<group>0</group>
<page>0</page>
<part>0</part>
<limit>10</limit>
<total>4</total>
<informationsystem_item_properties>
<property id="61">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>popup</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>popup</tag_name>
<sorting>0</sorting>
<image_large_max_width>300</image_large_max_width>
<image_large_max_height>300</image_large_max_height>
<image_small_max_width>68</image_small_max_width>
<image_small_max_height>68</image_small_max_height>
<hide_small_image>0</hide_small_image>
<guid>36162141-532E-F312-648C-3A62638EC4F3</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
</informationsystem_item_properties>
<informationsystem_item id="372">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Сбербанк.Онлайн</name>
<description><p>Оплачивайте услуги на сайте &laquo;Сбербанка&raquo; или в мобильном приложении быстро и без комиссии!</p></description>
<active>1</active>
<text><p>Для оплаты через мобильное приложение или на сайте &laquo;СБЕРБАНК.ОНЛАЙН&raquo;: 1. Войдите в приложение или на сайт Сбербанка, в раздел ПЛАТЕЖИ; 2. В строке поиска введите &laquo;iflat&raquo; и нажмите на &laquo;поиск&raquo;; 3. Кликните на иконку с нашим логотипом и введите номер лицевого счета (номер договора); 4. Введите сумму, выберите карту для списания средств и нажмите ПРОДОЛЖИТЬ; 5. При необходимости подтвердите операцию кодом, пришедшим в виде СМС.</p></text>
<image_large>information_items_372.png</image_large>
<image_small>small_information_items_372.png</image_small>
<image_large_width>69</image_large_width>
<image_large_height>69</image_large_height>
<image_small_width>69</image_small_width>
<image_small_height>69</image_small_height>
<sorting>1</sorting>
<ip>91.143.43.110</ip>
<path>372</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>2187</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/372/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:49:46</datetime>
<start_datetime>29.09.2017 14:50:12</start_datetime>
<end_datetime>27.07.3018 14:50:14</end_datetime>
<dir>/upload/information_system_22/3/7/2/item_372/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="20">
<property_id>61</property_id>
<entity_id>372</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="374">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Офисы продаж</name>
<description><p>Вы можете оплатить наши услуги без комиссии и получить консультацию об услугах в ближайшем офисе продаж.</p></description>
<active>1</active>
<text><p>Мы всегда рады видеть Вас в наших офисах продаж. В любом из них вы можете оставить заявку на подключение, узнать о действующих акциях и специальных предложениях, приобрести дополнительное оборудование, вызвать специалиста и подключить дополнительные услуги. Узнать режим работы ближайшего к Вам офиса можно <a href="/contact/">здесь</a>.</p></text>
<image_large></image_large>
<image_small>small_information_items_374.png</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>250</image_small_width>
<image_small_height>59</image_small_height>
<sorting>2</sorting>
<ip>91.143.43.110</ip>
<path>374</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>363</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/374/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:57:57</datetime>
<start_datetime>29.09.2017 14:58:05</start_datetime>
<end_datetime>25.05.3018 14:58:07</end_datetime>
<dir>/upload/information_system_22/3/7/4/item_374/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="19">
<property_id>61</property_id>
<entity_id>374</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="375">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Платёжная система Uniteller</name>
<description><p>Пополняйте счет банковской картой в личном кабинете или на сайте. Безопасно и без комиссии!</p></description>
<active>1</active>
<text><p>Безопасность платежного сервиса Uniteller подтверждена сертификатом стандарта безопасности данных индустрии платежных карт PCI DSS. Надежность сервиса обеспечивается интеллектуальной системой мониторинга мошеннических операций, применением 3D Secure &mdash; современной технологии обеспечения безопасности интернет-платежей.</p></text>
<image_large></image_large>
<image_small>small_information_items_375.png</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>300</image_small_width>
<image_small_height>97</image_small_height>
<sorting>3</sorting>
<ip>91.143.43.110</ip>
<path>375</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>590</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/375/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:59:48</datetime>
<start_datetime>29.09.2017 14:59:59</start_datetime>
<end_datetime>07.07.3018 15:00:02</end_datetime>
<dir>/upload/information_system_22/3/7/5/item_375/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="18">
<property_id>61</property_id>
<entity_id>375</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="441">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Оплата по реквизитам</name>
<description><p>Способ оплаты по реквизитам для юридических лиц через <span>&laquo;Сбербанк.Онлайн&raquo;</span></p></description>
<active>1</active>
<text><div id="tab">content here</div></text>
<image_large></image_large>
<image_small></image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width></image_small_width>
<image_small_height></image_small_height>
<sorting>4</sorting>
<ip>94.228.198.5</ip>
<path>441</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>6</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/441/</url>
<date>05.06.2020</date>
<datetime>05.06.2020 12:02:43</datetime>
<start_datetime>0000-00-00 00:00:00</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/information_system_22/4/4/1/item_441/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="17">
<property_id>61</property_id>
<entity_id>441</entity_id>
<value>butt-on</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
</informationsystem>
<informationsystem_dir_id>0</informationsystem_dir_id>
<structure_id>520</structure_id>
<site_id>2</site_id>
<name>Оплата</name>
<description></description>
<items_sorting_direction>0</items_sorting_direction>
<items_sorting_field>2</items_sorting_field>
<groups_sorting_direction>0</groups_sorting_direction>
<groups_sorting_field>0</groups_sorting_field>
<image_large_max_width>300</image_large_max_width>
<image_large_max_height>300</image_large_max_height>
<image_small_max_width>68</image_small_max_width>
<image_small_max_height>68</image_small_max_height>
<siteuser_group_id>0</siteuser_group_id>
<use_captcha>1</use_captcha>
<watermark_file></watermark_file>
<watermark_default_use_large_image>0</watermark_default_use_large_image>
<watermark_default_use_small_image>0</watermark_default_use_small_image>
<watermark_default_position_x>50%</watermark_default_position_x>
<watermark_default_position_y>100%</watermark_default_position_y>
<user_id>19</user_id>
<items_on_page>10</items_on_page>
<format_date>%d.%m.%Y</format_date>
<format_datetime>%d.%m.%Y %H:%M:%S</format_datetime>
<url_type>0</url_type>
<typograph_default_items>0</typograph_default_items>
<typograph_default_groups>0</typograph_default_groups>
<apply_tags_automatically>1</apply_tags_automatically>
<change_filename>1</change_filename>
<apply_keywords_automatically>0</apply_keywords_automatically>
<group_image_large_max_width>300</group_image_large_max_width>
<group_image_large_max_height>300</group_image_large_max_height>
<group_image_small_max_width>70</group_image_small_max_width>
<group_image_small_max_height>70</group_image_small_max_height>
<preserve_aspect_ratio>1</preserve_aspect_ratio>
<preserve_aspect_ratio_small>1</preserve_aspect_ratio_small>
<preserve_aspect_ratio_group>0</preserve_aspect_ratio_group>
<preserve_aspect_ratio_group_small>0</preserve_aspect_ratio_group_small>
<http>//iflat.ru</http>
<url>/payment/</url>
<captcha_id>54677</captcha_id>
<items_count>4</items_count>
<items_total_count>4</items_total_count>
<subgroups_count>0</subgroups_count>
<subgroups_total_count>0</subgroups_total_count>
<siteuser_id>0</siteuser_id>
<ОтображатьСсылкуНаАрхив>0</ОтображатьСсылкуНаАрхив>
<ОтображатьСсылкиНаСледующиеСтраницы>1</ОтображатьСсылкиНаСледующиеСтраницы>
<ТекущаяГруппа>0</ТекущаяГруппа>
<show_comments>0</show_comments>
<show_add_comments>0</show_add_comments>
<group>0</group>
<page>0</page>
<part>0</part>
<limit>10</limit>
<total>4</total>
<informationsystem_item_properties>
<property id="61">
<property_dir_id>0</property_dir_id>
<list_id>0</list_id>
<informationsystem_id>0</informationsystem_id>
<shop_id>0</shop_id>
<name>popup</name>
<description></description>
<type>1</type>
<default_value></default_value>
<tag_name>popup</tag_name>
<sorting>0</sorting>
<image_large_max_width>300</image_large_max_width>
<image_large_max_height>300</image_large_max_height>
<image_small_max_width>68</image_small_max_width>
<image_small_max_height>68</image_small_max_height>
<hide_small_image>0</hide_small_image>
<guid>36162141-532E-F312-648C-3A62638EC4F3</guid>
<multiple>1</multiple>
<user_id>19</user_id>
</property>
</informationsystem_item_properties>
<informationsystem_item id="372">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Сбербанк.Онлайн</name>
<description><p>Оплачивайте услуги на сайте &laquo;Сбербанка&raquo; или в мобильном приложении быстро и без комиссии!</p></description>
<active>1</active>
<text><p>Для оплаты через мобильное приложение или на сайте &laquo;СБЕРБАНК.ОНЛАЙН&raquo;: 1. Войдите в приложение или на сайт Сбербанка, в раздел ПЛАТЕЖИ; 2. В строке поиска введите &laquo;iflat&raquo; и нажмите на &laquo;поиск&raquo;; 3. Кликните на иконку с нашим логотипом и введите номер лицевого счета (номер договора); 4. Введите сумму, выберите карту для списания средств и нажмите ПРОДОЛЖИТЬ; 5. При необходимости подтвердите операцию кодом, пришедшим в виде СМС.</p></text>
<image_large>information_items_372.png</image_large>
<image_small>small_information_items_372.png</image_small>
<image_large_width>69</image_large_width>
<image_large_height>69</image_large_height>
<image_small_width>69</image_small_width>
<image_small_height>69</image_small_height>
<sorting>1</sorting>
<ip>91.143.43.110</ip>
<path>372</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>2187</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/372/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:49:46</datetime>
<start_datetime>29.09.2017 14:50:12</start_datetime>
<end_datetime>27.07.3018 14:50:14</end_datetime>
<dir>/upload/information_system_22/3/7/2/item_372/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="20">
<property_id>61</property_id>
<entity_id>372</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="374">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Офисы продаж</name>
<description><p>Вы можете оплатить наши услуги без комиссии и получить консультацию об услугах в ближайшем офисе продаж.</p></description>
<active>1</active>
<text><p>Мы всегда рады видеть Вас в наших офисах продаж. В любом из них вы можете оставить заявку на подключение, узнать о действующих акциях и специальных предложениях, приобрести дополнительное оборудование, вызвать специалиста и подключить дополнительные услуги. Узнать режим работы ближайшего к Вам офиса можно <a href="/contact/">здесь</a>.</p></text>
<image_large></image_large>
<image_small>small_information_items_374.png</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>250</image_small_width>
<image_small_height>59</image_small_height>
<sorting>2</sorting>
<ip>91.143.43.110</ip>
<path>374</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>363</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/374/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:57:57</datetime>
<start_datetime>29.09.2017 14:58:05</start_datetime>
<end_datetime>25.05.3018 14:58:07</end_datetime>
<dir>/upload/information_system_22/3/7/4/item_374/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="19">
<property_id>61</property_id>
<entity_id>374</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="375">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Платёжная система Uniteller</name>
<description><p>Пополняйте счет банковской картой в личном кабинете или на сайте. Безопасно и без комиссии!</p></description>
<active>1</active>
<text><p>Безопасность платежного сервиса Uniteller подтверждена сертификатом стандарта безопасности данных индустрии платежных карт PCI DSS. Надежность сервиса обеспечивается интеллектуальной системой мониторинга мошеннических операций, применением 3D Secure &mdash; современной технологии обеспечения безопасности интернет-платежей.</p></text>
<image_large></image_large>
<image_small>small_information_items_375.png</image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width>300</image_small_width>
<image_small_height>97</image_small_height>
<sorting>3</sorting>
<ip>91.143.43.110</ip>
<path>375</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>590</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/375/</url>
<date>29.09.2017</date>
<datetime>29.09.2017 14:59:48</datetime>
<start_datetime>29.09.2017 14:59:59</start_datetime>
<end_datetime>07.07.3018 15:00:02</end_datetime>
<dir>/upload/information_system_22/3/7/5/item_375/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="18">
<property_id>61</property_id>
<entity_id>375</entity_id>
<value>net</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
<informationsystem_item id="441">
<informationsystem_id>22</informationsystem_id>
<informationsystem_group_id>0</informationsystem_group_id>
<shortcut_id>0</shortcut_id>
<name>Оплата по реквизитам</name>
<description><p>Способ оплаты по реквизитам для юридических лиц через <span>&laquo;Сбербанк.Онлайн&raquo;</span></p></description>
<active>1</active>
<text><div id="tab">content here</div></text>
<image_large></image_large>
<image_small></image_small>
<image_large_width></image_large_width>
<image_large_height></image_large_height>
<image_small_width></image_small_width>
<image_small_height></image_small_height>
<sorting>4</sorting>
<ip>94.228.198.5</ip>
<path>441</path>
<indexing>1</indexing>
<seo_title></seo_title>
<seo_description></seo_description>
<seo_keywords></seo_keywords>
<siteuser_group_id>-1</siteuser_group_id>
<showed>6</showed>
<user_id>19</user_id>
<siteuser_id>0</siteuser_id>
<deleted>0</deleted>
<url>/payment/441/</url>
<date>05.06.2020</date>
<datetime>05.06.2020 12:02:43</datetime>
<start_datetime>0000-00-00 00:00:00</start_datetime>
<end_datetime>0000-00-00 00:00:00</end_datetime>
<dir>/upload/information_system_22/4/4/1/item_441/</dir>
<rate likes="0" dislikes="0">0</rate>
<comments_count>0</comments_count>
<comments_grade_sum>0</comments_grade_sum>
<comments_grade_count>0</comments_grade_count>
<comments_average_grade>0</comments_average_grade>
<property_value id="17">
<property_id>61</property_id>
<entity_id>441</entity_id>
<value>butt-on</value>
<property_dir_id>0</property_dir_id>
<tag_name>popup</tag_name>
</property_value>
</informationsystem_item>
</informationsystem>
aikyaira,
Это XML а сам шаблон XSL?
Это XML а сам шаблон XSL?
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Seri,
<!-- Шаблон вывода информационного элемента -->
<xsl:template match="informationsystem_item">
<div class="block">
<a href="{url}" class="title"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
<div class="pic"><xsl:if test="image_small!=''">
<a href="{url}"><img src="{dir}{image_small}"/></a>
</xsl:if></div>
<div><xsl:value-of disable-output-escaping="yes" select="description"/></div>
<xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<a href="#" id="{property_value[tag_name='popup']/value}"></a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn"></a>
</xsl:when>
</xsl:choose>
</div>
</xsl:template>
<xsl:template match="informationsystem_item">
<div class="block">
<a href="{url}" class="title"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
<div class="pic"><xsl:if test="image_small!=''">
<a href="{url}"><img src="{dir}{image_small}"/></a>
</xsl:if></div>
<div><xsl:value-of disable-output-escaping="yes" select="description"/></div>
<xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<a href="#" id="{property_value[tag_name='popup']/value}"></a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn"></a>
</xsl:when>
</xsl:choose>
</div>
</xsl:template>
aikyaira,
Полный XSL нельзя?
Полный XSL нельзя?
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Seri,
<?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:template match="/">
<xsl:apply-templates select="/informationsystem"/>
</xsl:template>
<xsl:variable name="n" select="number(3)"/>
<xsl:template match="/informationsystem">
<!-- Получаем ID родительской группы и записываем в переменную $group -->
<xsl:variable name="group" select="group"/>
<!-- Если в находимся корне - выводим название информационной системы -->
<xsl:choose>
<xsl:when test="$group = 0">
<!--<h1><xsl:value-of disable-output-escaping="yes" select="name"/></h1>-->
<!-- Описание выводится при отсутствии фильтрации по тэгам -->
<xsl:if test="count(tag) = 0 and page = 0 and description != ''">
<div hostcms:id="{@id}" hostcms:field="description" hostcms:entity="informationsystem" hostcms:type="wysiwyg"><xsl:value-of disable-output-escaping="yes" select="description"/></div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<!-- Описание выводим только на первой странице -->
<xsl:if test="page = 0 and .//informationsystem_group[@id=$group]/description != ''">
<div hostcms:id="{$group}" hostcms:field="description" hostcms:entity="informationsystem_group" hostcms:type="wysiwyg"><xsl:value-of disable-output-escaping="yes" select=".//informationsystem_group[@id=$group]/description"/></div>
</xsl:if>
<!-- Путь к группе -->
<p>
<xsl:apply-templates select=".//informationsystem_group[@id=$group]" mode="breadCrumbs"/>
</p>
</xsl:otherwise>
</xsl:choose>
<!-- Обработка выбранных тэгов -->
<xsl:if test="count(tag)">
<p class="h2">Метка — <strong><xsl:value-of select="tag/name" disable-output-escaping="yes" /></strong>.</p>
<xsl:if test="tag/description != ''">
<p><xsl:value-of select="tag/description" disable-output-escaping="yes" /></p>
</xsl:if>
</xsl:if>
<!-- Отображение подгрупп данной группы, только если подгруппы есть и не идет фильтра по меткам -->
<xsl:if test="count(tag) = 0 and count(.//informationsystem_group[parent_id=$group]) > 0">
<div class="group_list">
<xsl:apply-templates select=".//informationsystem_group[parent_id=$group][position() mod $n = 1]" mode="groups"/>
</div>
</xsl:if>
<!-- Отображение записи информационной системы -->
<xsl:apply-templates select="informationsystem_item"/>
<xsl:if test="count(informationsystem_group_properties) and group != 0">
<div style="margin: 10px 0px;">
<h2>Атрибуты группы инфоэлементов</h2>
<xsl:if test="count(informationsystem_group[@id = //group]/property[parent_id = 0])">
<table border="0">
<xsl:apply-templates select="informationsystem_group[@id = //group]/property[parent_id = 0]"/>
</table>
</xsl:if>
<xsl:apply-templates select="informationsystem_group_properties"/>
</div>
</xsl:if>
<!-- Rss -->
<!--
<div class="rss">
<img src="/images/rss.png"/><xsl:text> </xsl:text><a href="{url}rss/">RSS</a>
</div>
-->
</xsl:template>
<!-- Вывод строки со значением свойства -->
<xsl:template match="property">
<tr>
<td style="padding: 5px" bgcolor="#eeeeee">
<b><xsl:value-of select="name"/></b>
</td>
<td style="padding: 5px" bgcolor="#eeeeee">
<xsl:choose>
<xsl:when test="type = 1">
<a href="{file_path}">Скачать файл</a>
</xsl:when>
<xsl:when test="type = 7">
<xsl:choose>
<xsl:when test="value = 1">
<input type="checkbox" checked="" disabled="" />
</xsl:when>
<xsl:otherwise>
<input type="checkbox" disabled="" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="value"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
<!-- Шаблон выводит рекурсивно ссылки на группы инф. элемента -->
<xsl:template match="informationsystem_group" mode="breadCrumbs">
<xsl:variable name="parent_id" select="parent_id"/>
<xsl:apply-templates select="//informationsystem_group[@id=$parent_id]" mode="breadCrumbs"/>
<xsl:if test="parent_id=0">
<a href="{/informationsystem/url}" hostcms:id="{/informationsystem/@id}" hostcms:field="name" hostcms:entity="informationsystem">
<xsl:value-of disable-output-escaping="yes" select="/informationsystem/name"/>
</a>
</xsl:if>
<span><xsl:text> → </xsl:text></span>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_group">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</a>
</xsl:template>
<!-- Шаблон выводит группы свойств для группы инфосистемы -->
<xsl:template match="informationsystem_group_properties">
<p><b><xsl:value-of select="information_propertys_groups_dir_name"/></b></p>
<xsl:variable name="dir_id" select="@id"/>
<xsl:if test="count(//informationsystem_group[@id = //group]/property[parent_id = $dir_id])">
<table border="0">
<xsl:apply-templates select="//informationsystem_group[@id = //group]/property[parent_id = $dir_id]"/>
</table>
</xsl:if>
<xsl:if test="count(informationsystem_group_properties)">
<blockquote>
<xsl:apply-templates select="informationsystem_group_properties"/>
</blockquote>
</xsl:if>
</xsl:template>
<!-- Шаблон выводит ссылки подгруппы информационного элемента -->
<xsl:template match="informationsystem_group" mode="groups">
<ul>
<xsl:for-each select=". | following-sibling::informationsystem_group[position() < $n]">
<li>
<xsl:if test="image_small!=''">
<a href="{url}" target="_blank">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if>
<a href="{url}"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="count">(<xsl:value-of select="items_total_count"/>)</span>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<!-- Шаблон вывода информационного элемента -->
<xsl:template match="informationsystem_item">
<div class="block">
<a href="{url}" class="title"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
<div class="pic"><xsl:if test="image_small!=''">
<a href="{url}"><img src="{dir}{image_small}"/></a>
</xsl:if></div>
<div><xsl:value-of disable-output-escaping="yes" select="description"/></div>
<xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<a href="#" id="{property_value[tag_name='popup']/value}"></a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn"></a>
</xsl:when>
</xsl:choose>
</div>
</xsl:template>
<!-- /// Метки для информационного элемента /// -->
<xsl:template match="tag">
<a href="{/informationsystem/url}tag/{urlencode}/" class="tag">
<xsl:value-of select="name"/>
</a>
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if></xsl:template>
<!-- Цикл для вывода строк ссылок -->
<xsl:template name="for">
<xsl:param name="limit"/>
<xsl:param name="page"/>
<xsl:param name="pre_count_page"/>
<xsl:param name="post_count_page"/>
<xsl:param name="i" select="0"/>
<xsl:param name="items_count"/>
<xsl:param name="visible_pages"/>
<xsl:variable name="n" select="ceiling($items_count div $limit)"/>
<xsl:variable name="start_page"><xsl:choose>
<xsl:when test="$page + 1 = $n"><xsl:value-of select="$page - $visible_pages + 1"/></xsl:when>
<xsl:when test="$page - $pre_count_page > 0"><xsl:value-of select="$page - $pre_count_page"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose></xsl:variable>
<!-- Для тестирования -->
<!--
<input style="" size="100" type="text" value="i:{$i} page:{$page} pre:{$pre_count_page} post:{$post_count_page} start:{$start_page} limit:{$limit} n:{$n}" />
-->
<xsl:if test="$items_count > $limit and ($page + $post_count_page + 1) > $i">
<!-- Заносим в переменную $group идентификатор текущей группы -->
<xsl:variable name="group" select="/informationsystem/group"/>
<!-- Путь для тэга -->
<xsl:variable name="tag_path">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="count(/informationsystem/tag) != 0">tag/<xsl:value-of select="/informationsystem/tag/urlencode"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем группу для формирования адреса ссылки -->
<xsl:variable name="group_link">
<xsl:choose>
<!-- Если группа не корневая (!=0) -->
<xsl:when test="$group != 0">
<xsl:value-of select="/informationsystem//informationsystem_group[@id=$group]/url"/>
</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise><xsl:value-of select="/informationsystem/url"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем адрес ссылки -->
<xsl:variable name="number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="$i != 0">page-<xsl:value-of select="$i + 1"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Выводим ссылку на первую страницу -->
<xsl:if test="$page - $pre_count_page > 0 and $i = $start_page">
<a href="{$group_link}{$tag_path}" class="page_link" style="text-decoration: none;">←</a>
</xsl:if>
<!-- Ссылка на предыдущую страницу для Ctrl + влево -->
<xsl:if test="$i = $start_page and $pre_count_page > 0">
<a class="page_link {$page}" href="{$group_link}page-{$i+$pre_count_page}/{$tag_path}" id="id_prev">< Назад</a>
</xsl:if>
<!-- Ставим ссылку на страницу-->
<xsl:if test="$i != $page">
<xsl:if test="($page - $pre_count_page) <= $i and $i < $n">
<!-- Выводим ссылки на видимые страницы -->
<a href="{$group_link}{$number_link}{$tag_path}" class="page_link">
<xsl:value-of select="$i + 1"/>
</a>
</xsl:if>
</xsl:if>
<!-- Ссылка на следующую страницу для Ctrl + вправо -->
<xsl:if test="$i+1 >= ($page + $post_count_page + 1) and $post_count_page > 0">
<a class="page_link" href="{$group_link}page-{$page+2}/{$tag_path}" id="id_next">Вперед ></a>
</xsl:if>
<!-- Выводим ссылку на последнюю страницу -->
<xsl:if test="$i+1 >= ($page + $post_count_page + 1) and $n > ($page + 1 + $post_count_page)">
<!-- Выводим ссылку на последнюю страницу -->
<a href="{$group_link}page-{$n}/{$tag_path}" class="page_link" style="text-decoration: none;">→</a>
</xsl:if>
<!-- Не ставим ссылку на страницу-->
<xsl:if test="$i = $page">
<span class="page_link">
<xsl:value-of select="$i+1"/>
</span>
</xsl:if>
<!-- Рекурсивный вызов шаблона. НЕОБХОДИМО ПЕРЕДАВАТЬ ВСЕ НЕОБХОДИМЫЕ ПАРАМЕТРЫ! -->
<xsl:call-template name="for">
<xsl:with-param name="i" select="$i + 1"/>
<xsl:with-param name="limit" select="$limit"/>
<xsl:with-param name="page" select="$page"/>
<xsl:with-param name="items_count" select="$items_count"/>
<xsl:with-param name="pre_count_page" select="$pre_count_page"/>
<xsl:with-param name="post_count_page" select="$post_count_page"/>
<xsl:with-param name="visible_pages" select="$visible_pages"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- Склонение после числительных -->
<xsl:template name="declension">
<xsl:param name="number" select="number"/>
<!-- Именительный падеж -->
<xsl:variable name="nominative">
<xsl:text>комментарий</xsl:text>
</xsl:variable>
<!-- Родительный падеж, единственное число -->
<xsl:variable name="genitive_singular">
<xsl:text>комментария</xsl:text>
</xsl:variable>
<xsl:variable name="genitive_plural">
<xsl:text>комментариев</xsl:text>
</xsl:variable>
<xsl:variable name="last_digit">
<xsl:value-of select="$number mod 10"/>
</xsl:variable>
<xsl:variable name="last_two_digits">
<xsl:value-of select="$number mod 100"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$last_digit = 1 and $last_two_digits != 11">
<xsl:value-of select="$nominative"/>
</xsl:when>
<xsl:when test="$last_digit = 2 and $last_two_digits != 12
or $last_digit = 3 and $last_two_digits != 13
or $last_digit = 4 and $last_two_digits != 14">
<xsl:value-of select="$genitive_singular"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$genitive_plural"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
<!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:template match="/">
<xsl:apply-templates select="/informationsystem"/>
</xsl:template>
<xsl:variable name="n" select="number(3)"/>
<xsl:template match="/informationsystem">
<!-- Получаем ID родительской группы и записываем в переменную $group -->
<xsl:variable name="group" select="group"/>
<!-- Если в находимся корне - выводим название информационной системы -->
<xsl:choose>
<xsl:when test="$group = 0">
<!--<h1><xsl:value-of disable-output-escaping="yes" select="name"/></h1>-->
<!-- Описание выводится при отсутствии фильтрации по тэгам -->
<xsl:if test="count(tag) = 0 and page = 0 and description != ''">
<div hostcms:id="{@id}" hostcms:field="description" hostcms:entity="informationsystem" hostcms:type="wysiwyg"><xsl:value-of disable-output-escaping="yes" select="description"/></div>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<!-- Описание выводим только на первой странице -->
<xsl:if test="page = 0 and .//informationsystem_group[@id=$group]/description != ''">
<div hostcms:id="{$group}" hostcms:field="description" hostcms:entity="informationsystem_group" hostcms:type="wysiwyg"><xsl:value-of disable-output-escaping="yes" select=".//informationsystem_group[@id=$group]/description"/></div>
</xsl:if>
<!-- Путь к группе -->
<p>
<xsl:apply-templates select=".//informationsystem_group[@id=$group]" mode="breadCrumbs"/>
</p>
</xsl:otherwise>
</xsl:choose>
<!-- Обработка выбранных тэгов -->
<xsl:if test="count(tag)">
<p class="h2">Метка — <strong><xsl:value-of select="tag/name" disable-output-escaping="yes" /></strong>.</p>
<xsl:if test="tag/description != ''">
<p><xsl:value-of select="tag/description" disable-output-escaping="yes" /></p>
</xsl:if>
</xsl:if>
<!-- Отображение подгрупп данной группы, только если подгруппы есть и не идет фильтра по меткам -->
<xsl:if test="count(tag) = 0 and count(.//informationsystem_group[parent_id=$group]) > 0">
<div class="group_list">
<xsl:apply-templates select=".//informationsystem_group[parent_id=$group][position() mod $n = 1]" mode="groups"/>
</div>
</xsl:if>
<!-- Отображение записи информационной системы -->
<xsl:apply-templates select="informationsystem_item"/>
<xsl:if test="count(informationsystem_group_properties) and group != 0">
<div style="margin: 10px 0px;">
<h2>Атрибуты группы инфоэлементов</h2>
<xsl:if test="count(informationsystem_group[@id = //group]/property[parent_id = 0])">
<table border="0">
<xsl:apply-templates select="informationsystem_group[@id = //group]/property[parent_id = 0]"/>
</table>
</xsl:if>
<xsl:apply-templates select="informationsystem_group_properties"/>
</div>
</xsl:if>
<!-- Rss -->
<!--
<div class="rss">
<img src="/images/rss.png"/><xsl:text> </xsl:text><a href="{url}rss/">RSS</a>
</div>
-->
</xsl:template>
<!-- Вывод строки со значением свойства -->
<xsl:template match="property">
<tr>
<td style="padding: 5px" bgcolor="#eeeeee">
<b><xsl:value-of select="name"/></b>
</td>
<td style="padding: 5px" bgcolor="#eeeeee">
<xsl:choose>
<xsl:when test="type = 1">
<a href="{file_path}">Скачать файл</a>
</xsl:when>
<xsl:when test="type = 7">
<xsl:choose>
<xsl:when test="value = 1">
<input type="checkbox" checked="" disabled="" />
</xsl:when>
<xsl:otherwise>
<input type="checkbox" disabled="" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="value"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
<!-- Шаблон выводит рекурсивно ссылки на группы инф. элемента -->
<xsl:template match="informationsystem_group" mode="breadCrumbs">
<xsl:variable name="parent_id" select="parent_id"/>
<xsl:apply-templates select="//informationsystem_group[@id=$parent_id]" mode="breadCrumbs"/>
<xsl:if test="parent_id=0">
<a href="{/informationsystem/url}" hostcms:id="{/informationsystem/@id}" hostcms:field="name" hostcms:entity="informationsystem">
<xsl:value-of disable-output-escaping="yes" select="/informationsystem/name"/>
</a>
</xsl:if>
<span><xsl:text> → </xsl:text></span>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="informationsystem_group">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</a>
</xsl:template>
<!-- Шаблон выводит группы свойств для группы инфосистемы -->
<xsl:template match="informationsystem_group_properties">
<p><b><xsl:value-of select="information_propertys_groups_dir_name"/></b></p>
<xsl:variable name="dir_id" select="@id"/>
<xsl:if test="count(//informationsystem_group[@id = //group]/property[parent_id = $dir_id])">
<table border="0">
<xsl:apply-templates select="//informationsystem_group[@id = //group]/property[parent_id = $dir_id]"/>
</table>
</xsl:if>
<xsl:if test="count(informationsystem_group_properties)">
<blockquote>
<xsl:apply-templates select="informationsystem_group_properties"/>
</blockquote>
</xsl:if>
</xsl:template>
<!-- Шаблон выводит ссылки подгруппы информационного элемента -->
<xsl:template match="informationsystem_group" mode="groups">
<ul>
<xsl:for-each select=". | following-sibling::informationsystem_group[position() < $n]">
<li>
<xsl:if test="image_small!=''">
<a href="{url}" target="_blank">
<img src="{dir}{image_small}" align="middle"/>
</a><xsl:text> </xsl:text></xsl:if>
<a href="{url}"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="count">(<xsl:value-of select="items_total_count"/>)</span>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<!-- Шаблон вывода информационного элемента -->
<xsl:template match="informationsystem_item">
<div class="block">
<a href="{url}" class="title"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
<div class="pic"><xsl:if test="image_small!=''">
<a href="{url}"><img src="{dir}{image_small}"/></a>
</xsl:if></div>
<div><xsl:value-of disable-output-escaping="yes" select="description"/></div>
<xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<a href="#" id="{property_value[tag_name='popup']/value}"></a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn"></a>
</xsl:when>
</xsl:choose>
</div>
</xsl:template>
<!-- /// Метки для информационного элемента /// -->
<xsl:template match="tag">
<a href="{/informationsystem/url}tag/{urlencode}/" class="tag">
<xsl:value-of select="name"/>
</a>
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if></xsl:template>
<!-- Цикл для вывода строк ссылок -->
<xsl:template name="for">
<xsl:param name="limit"/>
<xsl:param name="page"/>
<xsl:param name="pre_count_page"/>
<xsl:param name="post_count_page"/>
<xsl:param name="i" select="0"/>
<xsl:param name="items_count"/>
<xsl:param name="visible_pages"/>
<xsl:variable name="n" select="ceiling($items_count div $limit)"/>
<xsl:variable name="start_page"><xsl:choose>
<xsl:when test="$page + 1 = $n"><xsl:value-of select="$page - $visible_pages + 1"/></xsl:when>
<xsl:when test="$page - $pre_count_page > 0"><xsl:value-of select="$page - $pre_count_page"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose></xsl:variable>
<!-- Для тестирования -->
<!--
<input style="" size="100" type="text" value="i:{$i} page:{$page} pre:{$pre_count_page} post:{$post_count_page} start:{$start_page} limit:{$limit} n:{$n}" />
-->
<xsl:if test="$items_count > $limit and ($page + $post_count_page + 1) > $i">
<!-- Заносим в переменную $group идентификатор текущей группы -->
<xsl:variable name="group" select="/informationsystem/group"/>
<!-- Путь для тэга -->
<xsl:variable name="tag_path">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="count(/informationsystem/tag) != 0">tag/<xsl:value-of select="/informationsystem/tag/urlencode"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем группу для формирования адреса ссылки -->
<xsl:variable name="group_link">
<xsl:choose>
<!-- Если группа не корневая (!=0) -->
<xsl:when test="$group != 0">
<xsl:value-of select="/informationsystem//informationsystem_group[@id=$group]/url"/>
</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise><xsl:value-of select="/informationsystem/url"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Определяем адрес ссылки -->
<xsl:variable name="number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="$i != 0">page-<xsl:value-of select="$i + 1"/>/</xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Выводим ссылку на первую страницу -->
<xsl:if test="$page - $pre_count_page > 0 and $i = $start_page">
<a href="{$group_link}{$tag_path}" class="page_link" style="text-decoration: none;">←</a>
</xsl:if>
<!-- Ссылка на предыдущую страницу для Ctrl + влево -->
<xsl:if test="$i = $start_page and $pre_count_page > 0">
<a class="page_link {$page}" href="{$group_link}page-{$i+$pre_count_page}/{$tag_path}" id="id_prev">< Назад</a>
</xsl:if>
<!-- Ставим ссылку на страницу-->
<xsl:if test="$i != $page">
<xsl:if test="($page - $pre_count_page) <= $i and $i < $n">
<!-- Выводим ссылки на видимые страницы -->
<a href="{$group_link}{$number_link}{$tag_path}" class="page_link">
<xsl:value-of select="$i + 1"/>
</a>
</xsl:if>
</xsl:if>
<!-- Ссылка на следующую страницу для Ctrl + вправо -->
<xsl:if test="$i+1 >= ($page + $post_count_page + 1) and $post_count_page > 0">
<a class="page_link" href="{$group_link}page-{$page+2}/{$tag_path}" id="id_next">Вперед ></a>
</xsl:if>
<!-- Выводим ссылку на последнюю страницу -->
<xsl:if test="$i+1 >= ($page + $post_count_page + 1) and $n > ($page + 1 + $post_count_page)">
<!-- Выводим ссылку на последнюю страницу -->
<a href="{$group_link}page-{$n}/{$tag_path}" class="page_link" style="text-decoration: none;">→</a>
</xsl:if>
<!-- Не ставим ссылку на страницу-->
<xsl:if test="$i = $page">
<span class="page_link">
<xsl:value-of select="$i+1"/>
</span>
</xsl:if>
<!-- Рекурсивный вызов шаблона. НЕОБХОДИМО ПЕРЕДАВАТЬ ВСЕ НЕОБХОДИМЫЕ ПАРАМЕТРЫ! -->
<xsl:call-template name="for">
<xsl:with-param name="i" select="$i + 1"/>
<xsl:with-param name="limit" select="$limit"/>
<xsl:with-param name="page" select="$page"/>
<xsl:with-param name="items_count" select="$items_count"/>
<xsl:with-param name="pre_count_page" select="$pre_count_page"/>
<xsl:with-param name="post_count_page" select="$post_count_page"/>
<xsl:with-param name="visible_pages" select="$visible_pages"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- Склонение после числительных -->
<xsl:template name="declension">
<xsl:param name="number" select="number"/>
<!-- Именительный падеж -->
<xsl:variable name="nominative">
<xsl:text>комментарий</xsl:text>
</xsl:variable>
<!-- Родительный падеж, единственное число -->
<xsl:variable name="genitive_singular">
<xsl:text>комментария</xsl:text>
</xsl:variable>
<xsl:variable name="genitive_plural">
<xsl:text>комментариев</xsl:text>
</xsl:variable>
<xsl:variable name="last_digit">
<xsl:value-of select="$number mod 10"/>
</xsl:variable>
<xsl:variable name="last_two_digits">
<xsl:value-of select="$number mod 100"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$last_digit = 1 and $last_two_digits != 11">
<xsl:value-of select="$nominative"/>
</xsl:when>
<xsl:when test="$last_digit = 2 and $last_two_digits != 12
or $last_digit = 3 and $last_two_digits != 13
or $last_digit = 4 and $last_two_digits != 14">
<xsl:value-of select="$genitive_singular"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$genitive_plural"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
aikyaira,
Так ведь работает же
Возможно вам нужно поменять местами так?
Так ведь работает же
Возможно вам нужно поменять местами так?
<xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn">butt-on</a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<a href="#" id="{property_value[tag_name='popup']/value}">net</a>
</xsl:when>
</xsl:choose>
<xsl:when test="property_value[tag_name='popup']/value = 'butt-on'">
<div class="hidden_text"><xsl:value-of disable-output-escaping="yes" select="text"/></div>
<a href="#" class="btn">butt-on</a>
</xsl:when>
<xsl:when test="property_value[tag_name='popup']/value = 'net'">
<a href="#" id="{property_value[tag_name='popup']/value}">net</a>
</xsl:when>
</xsl:choose>
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Seri,
под оплатой по реквизитам ссылка не выводится, а под остальными выводится
под оплатой по реквизитам ссылка не выводится, а под остальными выводится
aikyaira писал(а):
Ссылка есть, но пустая возможно вы еще не доработали.
под оплатой по реквизитам ссылка не выводится, а под остальными выводится
Ссылка есть, но пустая возможно вы еще не доработали.
E-mail: info@syrbek.ru / телега: @syrbek /skype: activexm / syrbek.ru / Поддержка сайтов / г. Москва [HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, Git, SVN, Redmine]
Seri,
Господи, какое я позорище, не догадалась через отладчик посмотреть, дико извиняюсь!
Спасибо за отзывчивость!
Господи, какое я позорище, не догадалась через отладчик посмотреть, дико извиняюсь!
Спасибо за отзывчивость!
Авторизация