plasmamedia,
В этих блоках структура XML полностью аналогична структуре XML в соответствующем модуле, т.е. структуре - структуре, в магазине - это группы и товары.
Учитывая, что у всех разный формат отображения универсального XSL нет.
Проверяете источник и номер сущности и в зависимости от этого выводить. Темплейт такой же, только для путях внутри этого темплейта нужно добавлять item/ (т.к. доп.информация внутри этого item находится).
Вот пример:
<?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:decimal-format name="my" decimal-separator="," grouping-separator="."/>
<xsl:template match="/">
<xsl:apply-templates select="/document"/>
</xsl:template>
<xsl:template match="/document">
<!-- Форма поиска -->
<form method="get" action="/search/">
<input type="text" size="50" name="text" value="{search_query}" maxlength="200" class="input_buttom_search"/>
 
<input type="submit" class="input_buttom_search_button" value="Искать"/>
</form>
<xsl:if test="search_query!=''">
<p>
<strong>Найдено <xsl:value-of select="count_items"/> <xsl:call-template name="declension">
<xsl:with-param name="number" select="count_items"/></xsl:call-template></strong>
</p>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="30"></td>
<td width="300"><b>Наименование</b></td>
<td width="130"><b>Артикул</b></td>
<td width="150"><b>Производитель</b></td>
<td width="100"><b>Цена</b></td>
</tr>
</table>
<xsl:if test="count_items!=0">
<ol start="{(current_page - 1) * items_on_page + 1}">
<xsl:apply-templates select="item">
</xsl:apply-templates>
</ol>
<!-- Строка ссылок на другие страницы результата поиска -->
<p>
<xsl:call-template name="for">
<xsl:with-param name="items_on_page" select="items_on_page"/>
<xsl:with-param name="current_page" select="current_page - 1"/>
<xsl:with-param name="count_items" select="count_items"/>
<xsl:with-param name="visible_pages">5</xsl:with-param>
</xsl:call-template>
<div style="clear: both"></div>
</p>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="item">
<li>
<xsl:choose>
<!-- Если магазин (page_module = 3) и тип элемента товары (page_module_value_type = 2) -->
<xsl:when test="page_module = 3 and page_module_value_type = 2">
<xsl:apply-templates select="item" mode="shop" />
</xsl:when>
<xsl:otherwise>
<a href="{page_address}">
<xsl:value-of select="page_name"/>
</a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
<!-- Шаблон для товара -->
<xsl:template match="item/item" mode="shop">
<!-- Определяем цвет фона -->
<xsl:variable name="background_color">
<xsl:choose>
<xsl:when test="(position() + 1) mod 2 > 0">#f7f7f7</xsl:when>
<xsl:otherwise>#ffffff</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div>
<table width="700" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="300">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</td>
<td width="150">
<xsl:value-of disable-output-escaping="yes" select="marking_of_goods"/>
</td>
<td width="150">
<!-- Продавец -->
<xsl:if test="producer/name != ''">
<p>
<xsl:value-of disable-output-escaping="yes" select="producer/name"/>
</p>
</xsl:if>
</td>
<td width="100">
<!-- Цена товара -->
<div style="display: inline">
<xsl:choose>
<xsl:when test="price != 0">
<xsl:variable name="pric" select="price"/>
<b>
<xsl:value-of select="format-number($pric, '###.##0,00', 'my')"/> 
<!-- Валюта товара -->
<xsl:value-of disable-output-escaping="yes" select="currency"/>
</b>
</xsl:when>
<xsl:otherwise>
<b>цена договорная</b>
</xsl:otherwise>
</xsl:choose>
<!-- Если цена со скидкой - выводим ее -->
<xsl:if test="price!=price_tax">
<br/>
<font color="gray">
<strike>
<xsl:variable name="pric_tax" select="price_tax"/>
<xsl:value-of select="format-number($pric_tax, '###.##0,00', 'my')"/> <xsl:value-of disable-output-escaping="yes" select="currency"/>
</strike>
</font>
</xsl:if>
<div style="display: inline; margin-left: 3px">
<input type="hidden" size="3" value="1" id="count_{@id}"/>
<a href="/shop/cart/?action=add&item_id={@id}" onclick="return AddIntoCart('{/shop/path}', {@id}, document.getElementById('count_{@id}').value)">
Заказать
</a>
</div>
</div>
</td>
</tr>
</table>
</div>
</xsl:template>
<xsl:template name="page_address" match="text()">
<xsl:param name="str" select="."/>
<xsl:param name="max">50</xsl:param>
<xsl:param name="hvost">10</xsl:param>
<xsl:param name="begin">
<xsl:choose>
<xsl:when test="string-length($str) > $max">
<xsl:value-of select="substring($str, 1, $max - $hvost)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($str, 1)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="end">
<xsl:choose>
<xsl:when test="string-length($str) > $max">
<xsl:value-of select="substring($str, string-length($str) - $hvost + 1, $hvost)"/>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="result">
<xsl:choose>
<xsl:when test="$end != ''">
<xsl:value-of select="concat($begin, '…', $end)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$begin"/>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:value-of disable-output-escaping="yes" select="$result"/>
</xsl:template>
<!-- Цикл для вывода строк ссылок -->
<xsl:template name="for">
<xsl:param name="i" select="0"/>
<xsl:param name="prefix">page</xsl:param>
<xsl:param name="items_on_page"/>
<xsl:param name="current_page"/>
<xsl:param name="count_items"/>
<xsl:param name="visible_pages"/>
<xsl:variable name="n" select="$count_items div $items_on_page"/>
<!-- Заносим в переменную $parent_group_id идентификатор текущей группы -->
<xsl:variable name="parent_group_id" select="/document/blocks/parent_group_id"/>
<!-- Считаем количество выводимых ссылок перед текущим элементом -->
<xsl:variable name="pre_count_page">
<xsl:choose>
<xsl:when test="$current_page > ($n - (round($visible_pages div 2) - 1))">
<xsl:value-of select="$visible_pages - ($n - $current_page)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Считаем количество выводимых ссылок после текущего элемента -->
<xsl:variable name="post_count_page">
<xsl:choose>
<xsl:when test="0 > $current_page - (round($visible_pages div 2) - 1)">
<xsl:value-of select="$visible_pages - $current_page - 1"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="round($visible_pages div 2) = ($visible_pages div 2)">
<xsl:value-of select="$visible_pages div 2"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="round($visible_pages div 2) - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$count_items > $items_on_page and $n > $i">
<!-- Определяем адрес ссылки -->
<xsl:variable name="number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="$i != 0">&<xsl:value-of select="$prefix"/>=<xsl:value-of select="$i + 1"/></xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Ставим ссылку на страницу-->
<xsl:if test="$i != $current_page">
<!-- Выводим ссылку на первую страницу -->
<xsl:if test="$current_page - $pre_count_page > 0 and $i = 0">
<a href="./?text={search_query_url}" class="page_link" style="text-decoration: none;">←</a>
</xsl:if>
<xsl:choose>
<xsl:when test="$i >= ($current_page - $pre_count_page) and ($current_page + $post_count_page) >= $i">
<!-- Выводим ссылки на видимые страницы -->
<a href="./?text={search_query_url}{$number_link}" class="page_link">
<xsl:value-of select="$i + 1"/>
</a>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
<!-- Выводим ссылку на последнюю страницу -->
<xsl:if test="$i+1 >= $n and $n > ($current_page + 1 + $post_count_page)">
<xsl:choose>
<xsl:when test="$n > round($n)">
<!-- Выводим ссылку на последнюю страницу -->
<a href="./?text={search_query_url}&{$prefix}={round($n+1)}" class="page_link" style="text-decoration: none;">→</a>
</xsl:when>
<xsl:otherwise>
<a href="./?text={search_query_url}&{$prefix}={round($n)}" class="page_link" style="text-decoration: none;">→</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
<!-- Ссылка на предыдущую страницу для Ctrl + влево -->
<xsl:if test="$current_page != 0 and $i = $current_page">
<xsl:variable name="prev_number_link">
<xsl:choose>
<!-- Если не нулевой уровень -->
<xsl:when test="($current_page - 1) != 0">&<xsl:value-of select="$prefix"/>=<xsl:value-of select="$i"/></xsl:when>
<!-- Иначе если нулевой уровень - просто ссылка на страницу со списком элементов -->
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a href="./?text={search_query_url}{$prev_number_link}" id="id_prev"></a>
</xsl:if>
<!-- Ссылка на следующую страницу для Ctrl + вправо -->
<xsl:if test="($n - 1) > $current_page and $i = $current_page">
<a href="./?text={search_query_url}&{$prefix}={$current_page+2}" id="id_next"></a>
</xsl:if>
<!-- Не ставим ссылку на страницу-->
<xsl:if test="$i = $current_page">
<span class="current">
<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="prefix" select="$prefix"/>
<xsl:with-param name="items_on_page" select="$items_on_page"/>
<xsl:with-param name="current_page" select="$current_page"/>
<xsl:with-param name="count_items" select="$count_items"/>
<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>