XSLT Repeat

I want to get an XSLT fragment (in Dreamweaver) to repeat a fixed number of times. The code below works fine but it returns all results and not a fixed number. How would I change this to only display 5 articles at a time?

<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="http://next.discovermine.com/Export/BucketRSS.asmx/Get?bid=1069641" -->
<!DOCTYPE xsl:stylesheet  [
      <!ENTITY nbsp   "&#160;">
      <!ENTITY copy   "&#169;">
      <!ENTITY reg    "&#174;">
      <!ENTITY trade  "&#8482;">
      <!ENTITY mdash  "&#8212;">
      <!ENTITY ldquo  "&#8220;">
      <!ENTITY rdquo  "&#8221;">
      <!ENTITY pound  "&#163;">
      <!ENTITY yen    "&#165;">
      <!ENTITY euro   "&#8364;">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">
  <xsl:for-each select="rss/channel/item">
    <strong><img src="images/rssitem_sm.gif" width="16" height="16" /><font size="-1">&nbsp;<a href="{link}" target="_blank"><xsl:value-of select="title"/></a></font></strong><br />
    <font size="-2"><xsl:value-of select="pubDate"/></font><br />
    <font size="-1"><xsl:value-of select="description" disable-output-escaping="yes"/></font><br />
    <br />
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)Information ArchitectCommented:
<xsl:for-each select="rss/channel/item">
should become
<xsl:for-each select="rss/channel/item[position() <= 5]">
Gertone (Geert Bormans)Information ArchitectCommented:
sorry, the EE forum ruined my code
<xsl:for-each select="rss/channel/item[position() &lt;= 5]">

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KBueschingAuthor Commented:
Perfect - works as expected, thanks for the help.
Gertone (Geert Bormans)Information ArchitectCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.