Hello all,
i have a xsl:for-each loop like this:
<xsl:for-each select="xc:agen dapunt[xc:datum/xc:year > $time_year or (xc:datum/xc:year=$time_y ear and xc:datum/xc:month > $time_month) or (xc:datum/xc:year=$time_y ear and xc:datum/xc:month=$time_ month and xc:datum/xc:day > $time_day)]">
<xsl:sort select="xc:datu m/xc:year" data-type="number"/>
<xsl:sort select="xc:datu m/xc:month" data-type="number"/>
<xsl:sort select="xc:datu m/xc:day" data-type="number"/>
<xsl:if test="position( .) < 10">
<li><xsl:valu e-of select="xc:datu m/xc:display"/>: <xsl:value-of select="xc:tite l"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agend apunt"/>
</li>
</xsl:if>
</xsl:for-each>
But this does not work. What i want to is that if there are more than 10 xc:agendapunt items
in the loop the loop should stop. How is this possible?? In someway is must count
the number of loops alreadty taken and only if that number is less than 10 is hould show
the output between the xsl:if
i have a xsl:for-each loop like this:
<xsl:for-each select="xc:agen dapunt[xc:datum/xc:year > $time_year or (xc:datum/xc:year=$time_y ear and xc:datum/xc:month > $time_month) or (xc:datum/xc:year=$time_y ear and xc:datum/xc:month=$time_ month and xc:datum/xc:day > $time_day)]">
<xsl:sort select="xc:datu m/xc:year" data-type="number"/>
<xsl:sort select="xc:datu m/xc:month" data-type="number"/>
<xsl:sort select="xc:datu m/xc:day" data-type="number"/>
<xsl:if test="position( .) < 10">
<li><xsl:valu e-of select="xc:datu m/xc:display"/>: <xsl:value-of select="xc:tite l"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agend apunt"/>
</li>
</xsl:if>
</xsl:for-each>
But this does not work. What i want to is that if there are more than 10 xc:agendapunt items
in the loop the loop should stop. How is this possible?? In someway is must count
the number of loops alreadty taken and only if that number is less than 10 is hould show
the output between the xsl:if
Comment