T
Tjerk Wolterink
Hello all,
i have a xsl:for-each loop like this:
<xsl:for-each select="xc:agendapunt[xc:datum/xc:year > $time_year or (xc:datum/xc:year=$time_year and xc:datum/xc:month > $time_month) or (xc:datum/xc:year=$time_year and xc:datum/xc:month=$time_month and xc:datum/xc:day > $time_day)]">
<xsl:sort select="xc:datum/xc:year" data-type="number"/>
<xsl:sort select="xc:datum/xc:month" data-type="number"/>
<xsl:sort select="xc:datum/xc:day" data-type="number"/>
<xsl:if test="position(.) < 10">
<li><xsl:value-of select="xc:datum/xc:display"/>: <xsl:value-of select="xc:titel"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agendapunt"/>
</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:agendapunt[xc:datum/xc:year > $time_year or (xc:datum/xc:year=$time_year and xc:datum/xc:month > $time_month) or (xc:datum/xc:year=$time_year and xc:datum/xc:month=$time_month and xc:datum/xc:day > $time_day)]">
<xsl:sort select="xc:datum/xc:year" data-type="number"/>
<xsl:sort select="xc:datum/xc:month" data-type="number"/>
<xsl:sort select="xc:datum/xc:day" data-type="number"/>
<xsl:if test="position(.) < 10">
<li><xsl:value-of select="xc:datum/xc:display"/>: <xsl:value-of select="xc:titel"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agendapunt"/>
</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