|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
RSS question
I am gathering an rss feed from the web and formatting the content using a basic xsl document. (I.e. Basic RSS reader.)
I want to limit the number of results displayed to 5, but I can't find any documentation on how to limit the number of results that are presented. Here is the code for my .xsl Any help is greatly appreciated! -------------------------------------------------------------------- <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl utput method="xml" omit-xml-declaration="yes" indent="yes"/><xsl:template match="*"> <table border="0" width="150" align="center"> <tr><td valign="top" align="center" class="title" bgcolor="#CC0000" > <xsl:attribute name="href"> <xsl:value-of select="*[local-name()='channel']/*[local-name()='link']"/> </xsl:attribute> <xsl:attribute name="target"> <xsl:text>top</xsl:text> </xsl:attribute> <xsl:value-of select="*[local-name()='channel']/*[local-name()='title']"/> <xsl:text disable-output-escaping="yes"> </xsl:text> </td></tr><tr><td valign="top" bgcolor="ghostwhite" class="headlines" > <xsl:for-each select="//*[local-name()='item']"> <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> <xsl:value-of select="*[local-name()='title']"/> </a> <br /> <br /> </xsl:for-each> </td></tr> </table> </xsl:template> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > RSS question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|