Hi
I am using the following stylesheet to display my news from google in my site.How can i restrict the count of news to 5 maxmimum
using this style sheet .
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<!-- RSSv2.0 Simple XSL with alternating item background colors Example by Phil 'iwonder' Guerra -->
<xsl:template match="/">
<div>
<xsl:apply-templates select="rss/channel"/>
</div>
</xsl:template>
<xsl:template match="rss/channel">
<xsl:variable name="link" select="link"/>
<xsl:variable name="description" select="description"/>
<xsl:variable name="image" select="image/url"/>
<xsl:variable name="idesc" select="image/description"/>
<xsl:variable name="ilink" select="image/link"/>
<xsl:variable name="iwide" select="image/width"/>
<xsl:variable name="ihigh" select="image/height"/>
<div class="head">
<xsl:if test="$image">
<a href="{$ilink}" title="{$idesc}">
<xsl:value-of select="ilink" />
</a>
<img src="{$image}" height="{$ihigh}" width="{$iwide}" />
</xsl:if>
<!--<font size="-2">
<xsl:value-of select="description" disable-output-escaping="yes"/>-->
<br/>
<a href="{$link}" target="NewWindow">
<xsl:value-of select="title" />
</a>
<!--<br/>
<xsl:value-of select="webMaster"/>
<br/>
<xsl:value-of select="copyright"/>-->
<!--</font>-->
<hr/>
</div>
<xsl:apply-templates select="item"/>
</xsl:template>
<xsl:template match="item">
<xsl:variable name="item_link" select="link"/>
<xsl:variable name="item_title" select="description"/>
<xsl:variable name="ikeyinfo" select="description"/>
<!-- <xsl:variable name:"idTitle" select="concat(substring-before($ikeyinfo,';'),title)" -->
<div>
<xsl:if test="position() mod 2 != 0">
<xsl:attribute name="style">background-color: #F5F5F5</xsl:attribute>
</xsl:if>
<div class="IssueSubject">
<a href="{$item_link}" target="NewWindow">
<xsl:value-of select="title" disable-output-escaping="yes" />
</a>
</div>
<div class="IssuePubDate">
<xsl:value-of select="pubDate"/>
</div>
<div>
<a href="$ilink" target="NewWindow">
<xsl:value-of select="ilink"/>
</a>
</div>
<!--<div class="IssueInfo">
<xsl:value-of select="substring-before($ikeyinfo,'<br>')" disable-output-escaping="yes"/>
</div>-->
<!-- <div class="IssueText">
<xsl:value-of select="substring-after(description,'<br><br>')" disable-output-escaping="yes"/>
</div>-->
</div>
<hr/>
</xsl:template>
</xsl:stylesheet>
Thanks in advance.