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: Samuzeau Pascal <samuzeau at sunaimed dot med dot univ-rennes1 dot fr>
- Date: Mon, 06 Aug 2001 09:50:31 +0200
- Organization: LIM
- References: <000201c11b67$5582a010$0100007f@PCUKMKA>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I have the same problem, and I work with Cocoon 1.8.
Is there any answer ?
PS
Michael Kay wrote:
> > 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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list