Subject: Re: [xsl] Limiting the number of RSS-items shown in result tree using xslt From: "Werner, Wolfgang" <mail@xxxxxxxxxxxxxxxxxxx> Date: Mon, 11 Oct 2004 12:35:15 +0200 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
| Perhaps something like this: | <xsl:for-each select='/item[position() < 11 and not(category='A')]'> | <xsl:sort select='date:format-date(pubDate,"ssmmHHDD")'/> | <xsl:if test='position() < 4> | <!-- include --> | </xsl:if> | </xsl:for-each> | | I also noticed that in your example, the rss feed is already sorted | descending by date, can you rely on that? If so, you could use | position() again to get the latest elements. i.e. just leave out xsl:sort in the template above.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBamHjqjaicDyx8o8RAs+PAJ4zyRFBtIXiC/pOFKKmu+AnudHc+wCeLgOL mXX0wgCodoAaE9fvmbH5kzM= =Y/2O -----END PGP SIGNATURE-----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Limiting the number of RS, Werner, Wolfgang | Thread | [xsl]cascading evaluation of variab, Janvier Majirus FANS |
Re: [xsl] Limiting the number of RS, Werner, Wolfgang | Date | [xsl] Ignoring Redundancy, michella |
Month |