Subject: [xsl] Limiting the number of RSS-items shown in result tree using xslt From: "jo lemen" <jo_lemen@xxxxxxxxxxxxx> Date: Mon, 11 Oct 2004 10:27:57 +0100 |
I manage two web sites on which I want to visualize a shared RSS 2.0 feed, but only partly. The items shown depend on the contents of the RSS feed's <category> tag and I only want to show the three most recent items selected. The RSS feed contains items categorized as either 'A', 'B' or 'both'. On web site 1, I want to show exactly 3 items from categories 'A' and 'both' (hence: not B), on site 2 I want to show exactly 3 items from categories 'B' and 'both' (hence: not A) It's no problem to limit the number of input items, for example, to 10: <xsl:if test="position() < 11"> and select them: <xsl:if test="not(category='A')"> My question: how can I limit the result tree to the 3 most recent, selected items out of a total of 10 items? Parsing is done with classic asp. All files are on the same server. The RSS sample feed can be found at http://users.pandora.be/chunga/RSSsamplefeed.xml The xsl files : see http://users.pandora.be/chunga/RSSsamplefeed_notA.xsl http://users.pandora.be/chunga/RSSsamplefeed_notB.xsl Hope someone can help. -- _____________________________________________________________ Web-based SMS services available at http://www.operamail.com. >From your mailbox to local or overseas cell phones. Powered by Outblaze
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How does one merge sequen, Jeni Tennison | Thread | Re: [xsl] Limiting the number of RS, Werner, Wolfgang |
Re: [xsl] How does one merge sequen, Jeni Tennison | Date | [xsl]cascading evaluation of variab, Janvier Majirus FANS |
Month |