Subject: RE: [xsl] I need to sort and then display only the first 12 entries of a node set From: "Bill Chmura" <Bill@xxxxxxxxxxxxx> Date: Tue, 11 Feb 2003 23:52:32 -0500 |
I did a foreach, and sorted inside that and did an if (position) type thing... I am not sure why this worked... Why the position reflects differntly inside the foreach... But it works so what the heck :) -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Bill Chmura Sent: Tuesday, February 11, 2003 5:33 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] I need to sort and then display only the first 12 entries of a node set Hello and please help me! I have a list that I need to sort and then display only the first 12, then in another one I need to sort and then display all the ones over 12... It is for a generating a page of recent entries, then a page of past entries... I tried this... ------------------------------------------ <xsl:apply-templates select="/Shsmith/Newsletters/Newsletter[position() < 12]"> <xsl:sort select="@dateposted" data-type="text" order="descending"/> </xsl:apply-templates> <xsl:apply-templates select="/Shsmith/Newsletters/Newsletter[position() = 12]" mode="archivelink"> <xsl:sort select="@dateposted" data-type="text" order="descending"/> </xsl:apply-templates> ----------------------------------------- Which worked fine until I added a new one. The position takes effect before the sort which is the reverse of what I need... So how can I sort it by the dateposted then only process the first 12 of them... Any help would be appreciated, be it a solution or thoery for a possible solution... Thanks Bill XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] I need to sort and then displ, Bill Chmura | Thread | Re: [xsl] I need to sort and then d, Jeni Tennison |
Re: RE: [xsl] Say thanks to XSL-Lis, Michael H. Semcheski | Date | Re: [xsl] Debugging XSL with XML Sp, Dimitre Novatchev |
Month |