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

Re: Newbie RSS/XSLT Configuration Question

Subject: Re: Newbie RSS/XSLT Configuration Question
From: Nic Ferrier <nferrier@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2004 16:21:56 +0000
rss xslt
scottspam@xxxxxxxxxxx writes:

> Sorry to bother you with such a simple question, but I'm stuck on this one. I'm 
> rendering an RSS feed with the XSLT file below, and simply want to limit the 
> number of articles that are displayed to 10. Right now, I think it's grabbing 
> however many the feed will allow. If someone could make the adjustment and email 
> me the file, that would be outstanding. Otherwise, if you can show me the 
> snippet of code that it takes to do this (and where exactly it goes), that would 
> also help a great deal. Thanks in advance.
>
> Scott
>
> http://home.comcast.net/~scottspam/RSS_edited.xslt

Send a cheque first, then you'll get your file.  /8-)


Your script uses for-each... it would be simpler to abstract the
template that renders the items from the for-each (there might be
scope for reuse there anyway) and put it in it's own template.

Once you've done that you could do:

  <xsl:apply-templates select="channel/item[position() &lt; 20]"/>

to give you the first 20.


Do you see?



-- 
Nic Ferrier
http://www.tapsellferrier.co.uk

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.