This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: correction: how to get new position() of a sorted result tree
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] correction: how to get new position() of a sorted result tree
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 2 Aug 2001 16:25:16 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I apologize for the typo in my previous question. The
> original XSLT code
> is:
> <xsl:template match="/">
> <xsl:apply-templates select="//article">
> <xsl:sort data-type="number"
> order="descending" select="@date" />
> </xsl:apply-templates>
> </xsl:template>
>
> <xsl:template match="article">
> <xsl:if test="position() < 100">
> ...... <!-- do processing here -->
> </xsl:if>
> </xsl:template>
>
>
> The question is how to get the position() from a sorted
> result tree. In
> the above code, calling position() returns the ID of the
> original pre-sorted
> tree.
It should return the position in the sorted sequence.
Which processor are you using?
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list