удалось построить! в шаблоне родительской категории потерялся
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
В итоге все это хозяйство выглядит так:
<xsl:template match="shop_group">
<ul>
<xsl:for-each select=". | following-sibling::shop_group[position() < $n]">
<li>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
<xsl:if test="count(shop_group) > 0">
<ul>
<xsl:apply-templates select="shop_group" mode="sub_group"/>
</ul>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="shop_group" mode="sub_group">
<li>
<a href="{url}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="shop_group"><xsl:value-of disable-output-escaping="yes" select="name"/></a><xsl:text> </xsl:text><span class="shop_count"><xsl:value-of select="items_total_count"/></span>
</li>
</xsl:template>
с учетом того, если в КОДЕ страницы ТДС интернет-магазина в контролер показа магазина добавить параметр:
->groupsMode('all')
В итоге вызов построится таким образом:
$Shop_Controller_Show
->xsl(
Core_Entity::factory('Xsl')->getByName($xslName)
)
->itemsProperties(TRUE)
->groupsMode('all')
->show();