[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Newbie RSS/XSLT Configuration Question
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() < 20]"/> to give you the first 20. Do you see? -- Nic Ferrier http://www.tapsellferrier.co.uk
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|