alexander.egorov, еще один вопрос. Как сделать чтобы
элементы были по 3 в ряд?
Знаю что можно сделать по аналогии с group,типа:
<xsl:apply-templates select="informationsystem_item[position() mod $n = 1]" mode="items"/>
А потом в шаблоне типа так:
<!-- Шаблон вывода информационного элемента -->
<xsl:template match="informationsystem_item" mode="items">
<div class="cw-imgs">
<xsl:for-each select=". | following-sibling::informationsystem_item[position() < $n]">
<div class="cw-card">
<h4><xsl:value-of select="description"/></h4>
<p><xsl:value-of select="name"/></p>
</div>
</xsl:for-each>
</div>
</xsl:template>
Но т.к. наверху закомментировал
<!--<xsl:apply-templates select="informationsystem_item"/>-->
, то нужно работать с вашим примером
<xsl:apply-templates select="/informationsystem//informationsystem_item[informationsystem_group_id = $id]"/>
Как все таки организовать вывод
элементов по три в ряд? Мой код на данный момент.
<!-- Шаблон выводит ссылки подгруппы информационного элемента -->
<xsl:template match="informationsystem_group" mode="groups">
<xsl:for-each select=". | following-sibling::informationsystem_group[position() < $n]">
<p><xsl:value-of select="name"/></p>
<xsl:variable name="id" select="@id" />
<xsl:apply-templates select="/informationsystem//informationsystem_item[informationsystem_group_id = $id]"/>
</xsl:for-each>
</xsl:template>
<!-- Шаблон вывода информационного элемента -->
<xsl:template match="informationsystem_item">
<div class="cw-imgs">
<div class="cw-card">
<h4><xsl:value-of select="description"/></h4>
<p><xsl:value-of select="name"/></p>
</div>
</div>
</xsl:template>
Заранее спасибо