This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: correction: how to get new position() of a sorted result tree


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() &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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]