RE: [xsl] correction: how to get new position() of a sorted result tree

Subject: RE: [xsl] correction: how to get new position() of a sorted result tree
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 2 Aug 2001 16:25:16 +0100
>     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() &lt; 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


Current Thread