xsl-list
[Top] [All Lists]

Re: Working through a sorted nodeset 3 at a time

2004-07-11 14:29:07


 select="current()[position() mode 3 = 1" mode="hits_page" />

current() always selects exactly one node, so position() is going to be
equal to 1, so the predicate here is doing nothing (even if you fix the
mod(e) typo and the missing ]

hard to know quite what you want since you didn't show your input or your
desired output but if you move the predicate to somewhere where
position() is determined by the xsl:sort it's probably closer to a
solution:

    <xsl:template match="ROW" mode="sorted_list">
<xsl:if test="position() mod 3 = 1">
        <xsl:apply-templates select="." mode="hits_page" />
</xsl:if>
    </xsl:template>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>