Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting an RSS feed

Status
Not open for further replies.

daint

Technical User
Oct 4, 2000
46
0
0
GB
Hello,

Hope this is post in ok in this forum.

I've been trying to format the google rss feed in a way that the top news item would have the associated image, then 4-5 more news items are listed, but that's all. A lot like the news is shown on the right hand side of
Using a xsl document, I can list every detail in the feed, or I can list just the titles, but can't seem to get it how I want it. I've used just simple xsl stylesheets found on the net due to my lack of knowledge.

Can anyone point me in the right direction, is this a simple thing to do?

The rss feed I'm trying to format is
Thanks
 
By the way, here's the xsl file I'm currently using

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl:eek:utput method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="*">

<!--SETS UP THE TABLE PROPERTIES-->
<table border="0" cellspacing="3">

<!--SETS UP THE TITLE CELL PROPERTIES-->
<tr><td valign="top" align="center" bgcolor="#EFEFEF" >

<!--SETS UP THE TITLE LINK-->
<a>
<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']" disable-output-escaping="yes"/>
</a>
</td></tr>

<!--SETS UP THE CONTENT AND TABLE CELLS FOR EACH NEWS ITEM-->

<xsl:for-each select="//*[local-name()='item']">
<tr><td valign="top" bgcolor="#E7F7FF">

<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']" disable-output-escaping="yes"/>
</a><br></br>
<xsl:value-of select="*[local-name()='description']" disable-output-escaping="yes"/>
<br></br>
</td></tr>
</xsl:for-each>

<!--CLOSES THE TABLE-->
</table>

</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
 
Sorry, I think this is the wrong forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top