Hi,
I'm totally new to XSL (didn't know it existed till yesterday!)
i downloaded a RSS newsfeed script for my website and started to modify
the design of it to suit my needs
the current output can be seen here
http://www.discountfirepagers.com/rss2/default.asp
as you can see there are many articles ...
I wish to limit the articles to just 5 items. however i can't figure how
to modify the XSL to do that for me
i know i have to break the for:each somehow or change it to a specified
loop but can't find any info on how to do this
can someone help please
Here is the XSL http://www.discountfirepagers.com/rss2/news.xsl
here is the XML
http://news.search.yahoo.com/news/rss?p=fire%20department
XSL
<?xml version="1.0" ?>
- <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
- <xsl:template match="*">
- <table border="0" width="100%" bgcolor="#666666" align="center">
- <tr>
- <td valign="top" bgcolor="white" class="headlines">
- <ul>
- <xsl:for-each select="//*[local-name()='item']">
- <li>
- <a>
- <xsl:attribute name="href">
<xsl:value-of select="*[local-name()='link']" />
</xsl:attribute>
- <xsl:attribute name="target">
<xsl:text>top</xsl:text>
</xsl:attribute>
- <font face="Verdana, Arial, Helvetica" color="#333333" size="0">
<xsl:value-of select="*[local-name()='title']" />
</font>
</a>
</li>
</xsl:for-each>
</ul>
</td>
</tr>
</table>
</xsl:template>
- <xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--