XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 3rd, 2003, 06:45 PM
atlwebguy atlwebguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 atlwebguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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">
<xslutput 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">&nbsp;</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>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > RSS question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT