I have the code below. I would like each one to stop after if-sentenses came back and executed a code block 4 times. Since I have no idea when the code block was executed 4 times, I cannot use position (), which was my first idea.
Any help would be greatly appreciated.
<xsl:for-each select="$itm//item[@template='news item']">
<xsl:sort select="sc:fld('start date',.)" data-type="text" order="descending"/>
<xsl:if test="sc:formatdate($date,'yyyyMMddHHmm') > sc:formatdate(sc:fld('start date',.),'yyyyMMddHHmm')">
<xsl:if test="sc:formatdate($date,'yyyyMMddHHmm') < sc:formatdate(sc:fld('end date',.),'yyyyMMddHHmm')">
</xsl:if>
</xsl:if>
</xsl:for-each>
source
share