<div class="filter-item">
<div class="caption">Производитель</div>
<ul>
<xsl:apply-templates select="/shop/producers/shop_producer" />
</ul>
</div>
<!-- Шаблон показа производителей -->
<xsl:template match="shop_producer">
<xsl:variable name="id" select="@id" />
<xsl:variable name="name">
<xsl:choose>
<xsl:when test="/shop/filter_mode = 0">
<xsl:value-of select="name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="path" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="position() = 4">
<xsl:text disable-output-escaping="yes"><div class="hidden"></xsl:text>
</xsl:if>
<li>
<input type="checkbox" value="{@id}" name="producer_id[]" id="producer_id_{@id}" data-property="producer_id" data-value="{$name}">
<xsl:if test="/shop/producer_id = @id">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
<label for="producer_id_{@id}">
<xsl:value-of select="name"/>
<!--<xsl:if test="count/node()">
<xsl:text> (</xsl:text><xsl:value-of select="count"/><xsl:text>)</xsl:text>
</xsl:if>-->
</label>
</input>
</li>
<xsl:if test="position() >= 4 and position() = last()">
<xsl:text disable-output-escaping="yes"></div></xsl:text>
<a href="javascript:;" class="show-all js-show-all" data-on="Скрыть" data-off="Показать все"><span>Показать все</span></a>
</xsl:if>
</xsl:template>