[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Limiting the number of RSS-items shown in result tree

Subject: 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
limit rss items
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.