Skip to main content Home Help (new window) Eric Shupps
Go Search
Home
Blogs
Company
Products
Services
Current News
Idera Acquires Sonar from BinaryWave
BinaryWave Announces SharePoint Performance Optimization Service
Upcoming Events
Home > Blogs > Eric Shupps > Posts > SharePoint 2007 RSS Aggregation Web Part
SharePoint 2007 RSS Aggregation Web Part
One of the most common requirements we have these days is to display RSS feeds on WSS/MOSS sites inside of a web part.  Most users want the ability to see just a list of article links, sorted by date, from multiple feed sources - a collection of technology blogs or all the official SharePoint blogs, for example.
 
There are several free utilities for performing RSS aggregation in SharePoint - inlcuding those that come out of the box with 2007 - but none of them work the way that I needed them to (in fact, I couldn't get the included web parts to work at all in WSS).  So I put together a basic RSS Aggregation web part that fits the bill. 
 
The functionality is really quite simple - supply the web part with a semi-colon delimited list of feed URL's, set a few parameters (like number of listings per feed, total number of listings, alternate stylesheet, etc.) and drop it onto a page.  The web part will display a list of links from each feed source sorted by publish date in descending order.  The formatting is controlled by a set of base and alternate styles that can be included in custom stylesheet or integrated with your base site definition styles.
 
You can download the RssAggregator web part here: http://www.binarywave.com/products/downloads/Free%20Utilities/BinaryWave.RssAggregator.zip.  The zip file contains the Visual Studio 2005 solution with full source code (written in C#) and a readme file with setup and configuration instructions.  Post any issues or questions as comments to this entry. 
 
Note: I discovered while putting this together that there are quite a few differing feed formats depending on which source you are trying to access.  Most RSS 2.0 and ATOM feeds should work but you may need to tweak the XML parsing methods in the source code if you are referencing a feed that uses non-standard or custom formatting in the source XML.  If you do make modifications, please post them here so everyone can benefit from your changes.

Comments

thanks

I've been looking for something like this for a while.

(Oh, and you do know the comments box obscures the blog text in FireFox?)
at 5/15/2007 9:40 PM

I'm not seeing it in the Site Settings | Web Parts | New

I don't see the listing in the new page.
The listing is in the web.config and i've done an IIS reset.
The DLL is in the correct bin directory.

What else could I be missing?
Thanks
Ron
at 5/16/2007 8:37 AM

I'm not seeing it in the Site Settings | Web Parts | New

I don't see the listing in the new page.
The listing is in the web.config and i've done an IIS reset.
The DLL is in the correct bin directory.

What else could I be missing?
Thanks
Ron
at 5/16/2007 8:42 AM

Error when adding RssAggregator to the Page

I can add it to the page and set the parameters, but when I end editing of the page, it throws an error and I have to use webpart maintenance to delete it. Has anyone else seen this happen or have any ideas about the cause?

Joel
at 6/12/2007 9:43 AM

Edit or Specify an XSLT

I notice that you're doing all the formatting in the code. I wonder if you might provide an update that allows you to modify the XSL that is used to present the feed.

(BTW the error mentioned in my previous post corrected itself on its own.)
at 6/13/2007 4:57 PM

Re: Edit or Specify and XSLT

I'm not much of an XSL person and I was in a hurry so I did it old school.  If anyone has XSL to format the RSS XML I'd be happy to include that code in the output and add an XSL parameter to the web part settings.   Anyone???
at 6/13/2007 5:14 PM

Some XSLT

Siegfried Weber wrote some XSLT for the XML web part in 2004 that works pretty well. His site seems to have disappeared off the web.

I don't know what I can fit in this comment box, but here is one of them:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rss="http://purl.org/rss/1.0/"
   xmlns:rdf09="http://my.netscape.com/rdf/simple/0.9/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/">

<xsl:output method="html" indent="yes"/>

<xsl:template name="includeScript">
<style type="text/css">
<![CDATA[
.Header
{
background-color: #f1f1f1;
}
.Header a, .Header a:active, .Header a:visited, .Header a:hover
{
color: black;
text-decoration: none;
}
.HeaderCollapse
{
background-color: #f1f1f1;
font-weight: bold;
padding-left: 0.2em;
width: 17px;
}
.HeaderCollapse a, .HeaderCollapse a:visited, .HeaderCollapse a:active, .HeaderCollapse a:hover
{
background-color: white;
border: 1px #707070 solid;
color: black;
display: block;
font-family: Tahoma, Verdana, Sans-Serif;
font-size: 8px;
height: 10px;
text-decoration: none;
width: 10px;
}
.Content
{
margin-top: -16px;
}
]]>
</style>

<script language="JavaScript" type="text/javascript">
<![CDATA[
function ExpGroup(szID, oElement)
{
var oID = document.getElementById(szID);
if (oElement.innerHTML == "-")
{
oElement.innerHTML = "+";
oElement.title= "Expand";
oID.style.display = "none";
}
else
{
oElement.innerHTML = "-";
oElement.title= "Collapse";
oID.style.display = "block";
}
try
{
window.event.returnValue = false;
window.event.cancelBubble = true;
}
catch (e) { }
}
]]>
</script>
</xsl:template>

<xsl:template match="rdf:RDF">
<xsl:variable name="IsEmptyRSS" select="not (rss:channel/rss:title)"/>
<xsl:variable name="IsEmptyRDF" select="not (rdf09:channel/rdf09:title)"/>
<xsl:choose>
<xsl:when test="not ($IsEmptyRDF)">
<xsl:call-template name="rdf_09" />
</xsl:when>
<xsl:when test="not ($IsEmptyRSS)">
<xsl:call-template name="rss_1" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="rss_1" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rss">
<xsl:choose>
<xsl:when test="@version = '2.0'">
<xsl:call-template name="rss_2" />
</xsl:when>
<xsl:when test="@version = '0.91'">
<xsl:call-template name="rss_091" />
</xsl:when>
<xsl:when test="@version = '0.92'">
<xsl:call-template name="rss_092" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="rss" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name="rss">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="channel/description" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="channel/link" /></xsl:attribute><xsl:value-of select="channel/title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="channel/item">
<xsl:variable name="TopicID" select="generate-id(link)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
<xsl:choose>
<xsl:when test="title != ''">
<xsl:value-of select="title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="link" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

<xsl:template name="rss_091">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="channel/description" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="channel/link" /></xsl:attribute><xsl:value-of select="channel/title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="channel/item">
<xsl:variable name="TopicID" select="generate-id(link)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
<xsl:choose>
<xsl:when test="title != ''">
<xsl:value-of select="title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="link" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

<xsl:template name="rss_092">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="channel/description" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="channel/link" /></xsl:attribute><xsl:value-of select="channel/title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="channel/item">
<xsl:variable name="TopicID" select="generate-id(description)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank">
<xsl:choose>
<xsl:when test="source/@url != ''">
<xsl:attribute name="href"><xsl:value-of select="source/@url" /></xsl:attribute>
</xsl:when>
<xsl:when test="enclosure/@url != ''">
<xsl:attribute name="href"><xsl:value-of select="enclosure/@url" /></xsl:attribute>
</xsl:when>
<xsl:when test="link != ''">
<xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="title != ''">
<xsl:value-of select="title" />
</xsl:when>
<xsl:when test="enclosure/@url != ''">
<xsl:value-of select="enclosure/@url" />
</xsl:when>
<xsl:when test="source/@url != ''">
<xsl:value-of select="source/@url" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">(No Title)</xsl:text>
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

<xsl:template name="rss_1">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="rss:channel/rss:title" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="rss:channel/rss:link" /></xsl:attribute><xsl:value-of select="rss:channel/rss:title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="rss:item">
<xsl:variable name="TopicID" select="generate-id(rss:link)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="rss:link" /></xsl:attribute>
<xsl:choose>
<xsl:when test="rss:title != ''">
<xsl:value-of select="rss:title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="rss:link" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (rss:description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="rss:description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

<xsl:template name="rdf_09">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="rdf09:channel/rdf09:title" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="rdf09:channel/rdf09:link" /></xsl:attribute><xsl:value-of select="rdf09:channel/rdf09:title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="rdf09:item">
<xsl:variable name="TopicID" select="generate-id(rdf09:link)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="rdf09:link" /></xsl:attribute>
<xsl:choose>
<xsl:when test="rdf09:title != ''">
<xsl:value-of select="rdf09:title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="rdf09:link" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (rdf09:description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="rdf09:description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

<xsl:template name="rss_2">
<xsl:call-template name="includeScript" />

<div align="center"><h3><a target="_blank"><xsl:attribute name="title"><xsl:value-of select="channel/description" /></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="channel/link" /></xsl:attribute><xsl:value-of select="channel/title" /></a></h3></div>
<div style="padding-left: 5px; padding-right: 5px; padding-bottom: 5px;">
<table class="Content" cellspacing="0" cellpadding="1">
<xsl:for-each select="channel/item">
<xsl:variable name="TopicID" select="generate-id(link)" />
<tr>
<td class="HeaderCollapse" align="center">
<a style="cursor: pointer; cursor: hand;" title="Expand"><xsl:attribute name="onclick">javascript:ExpGroup('<xsl:value-of select="$TopicID"/>', this)</xsl:attribute>+</a>
</td>
<td class="Header" style="width: 100%">
<a target="_blank">
<xsl:choose>
<xsl:when test="guid != ''">
<xsl:attribute name="href"><xsl:value-of select="guid" /></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="title != ''">
<xsl:value-of select="title" />
</xsl:when>
<xsl:when test="guid != ''">
<xsl:value-of select="guid" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="link" />
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
<tr>
<td colspan="2">
<div style="display: none; padding-top: 0.25em; padding-bottom: 0.25em; padding-left: 10px; padding-right: 10px;"><xsl:attribute name="id"><xsl:value-of select="$TopicID"/></xsl:attribute>
<xsl:variable name="IsEmpty" select="not (description)"/>
<xsl:choose>
<xsl:when test="description = ''">
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:when>
<xsl:when test="not ($IsEmpty)">
<xsl:value-of disable-output-escaping="yes" select="description" />
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">No description available</xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>

</xsl:stylesheet>
at 6/14/2007 4:03 AM

Any progress adding ability to Edit the XSL

I've tried to implement this XSL directly into the 'Alternate Stylesheet' field in the properties of the Feedlistings web part. I've also tried to separate the feeds by enter a multiple headers into the Feed Headers property. No luck.

Do you expect to work on the Feedlistings web part any more to add some additional ability to control the appearance of the feeds? It would be very helpful.

Thanks!
at 8/27/2007 4:16 PM

Authenticating an RSS Feed

I have a requirement to authenticate RSS feeds. Does BinaryWave have this capability?
at 9/4/2007 1:37 PM

Great webpart

Is there a way to display a portion of the text of the feed? Also, and this is the most important, is there a way to make all the links open in a new window? I hate having people leave my site just to view a piece of news.
at 9/26/2007 1:23 PM

How to get this customised with XSLT

How to get this customised with XSLT
at 12/6/2007 4:48 PM

XSLT

As I've stated previously, I am no XSL expert and I really don't have the time to learn it.  If someone could post some XSL that would turn a standard RSS 2.0 or ATOM feed into the same type of output that my HTML generates I would be ecstatic.  I'll release another version just for the XSL users if someone can supply the transformation code.  Anyone?  Please????
at 12/7/2007 8:42 AM

The standard MOSS/Sharepoint Services 3 web part contains some XSL

I've not used you code but you can see the default XSL by adding a standard RSS web part (or modyfying an existing one) and then clicking "XSL Editor".


<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
               version="1.0" exclude-result-prefixes="xsl ddwrt msxsl rssaggwrt"
               xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
               xmlns:rssaggwrt="http://schemas.microsoft.com/WebParts/v3/rssagg/runtime"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
               xmlns:rssFeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart"
               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
               xmlns:rss1="http://purl.org/rss/1.0/" xmlns:atom="http://www.w3.org/2005/Atom"
               xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
               xmlns:atom2="http://purl.org/atom/ns#">

    <xsl:param name="rss_FeedLimit">5</xsl:param>
    <xsl:param name="rss_ExpandFeed">false</xsl:param>
    <xsl:param name="rss_LCID">1033</xsl:param>
    <xsl:param name="rss_WebPartID">RSS_Viewer_WebPart</xsl:param>
    <xsl:param name="rss_alignValue">left</xsl:param>
    <xsl:param name="rss_IsDesignMode">True</xsl:param>

        <xsl:template match="rss">
            <xsl:call-template name="RSSMainTemplate"/>
        </xsl:template>

        <xsl:template match="rdf:RDF">
            <xsl:call-template name="RDFMainTemplate"/>
        </xsl:template>

        <xsl:template match="atom:feed">
            <xsl:call-template name="ATOMMainTemplate"/>
        </xsl:template>

        <xsl:template match="atom2:feed">
            <xsl:call-template name="ATOM2MainTemplate"/>
        </xsl:template>

        <xsl:template name="RSSMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:variable name="Rows" select="channel/item"/>
            <xsl:variable name="RowCount" select="count($Rows)"/>
            <div class="slm-layout-main" >           
            <div class="groupheader item medium">
                        <a href="{ddwrt:EnsureAllowedProtocol(string(channel/link))}">
                            <xsl:value-of select="channel/title"/>
                        </a>
            </div>           
            <xsl:call-template name="RSSMainTemplate.body">
                <xsl:with-param name="Rows" select="$Rows"/>
                <xsl:with-param name="RowCount" select="count($Rows)"/>
            </xsl:call-template>
            </div>
        </xsl:template>

        <xsl:template name="RSSMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="Rows"/>
            <xsl:param name="RowCount"/>
            <xsl:for-each select="$Rows">
                <xsl:variable name="CurPosition" select="position()" />
                <xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
                <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
                <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
                    <div class="item link-item" >
                            <a href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" >
                                <xsl:value-of select="title"/>
                            </a>
                            <xsl:if test="$rss_ExpandFeed = true()">
                                <xsl:call-template name="RSSMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                            <xsl:if test="$rss_ExpandFeed = false()">
                                <xsl:call-template name="RSSMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                    </div>                           
                </xsl:if>
            </xsl:for-each>
        </xsl:template>

<xsl:template name="RSSMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="DescriptionStyle"/>
            <xsl:param name="CurrentElement"/>
    <div id="{$CurrentElement}" class="description" align="$rss_alignValue" style="{$DescriptionStyle} text-align:{$rss_alignValue};">
                <xsl:choose>
                    <!-- some RSS2.0 contain pubDate tag, some others dc:date -->
                    <xsl:when test="string-length(pubDate) &gt; 0">
                        <xsl:variable name="pubDateLength" select="string-length(pubDate) - 3" />
        <xsl:value-of select="ddwrt:FormatDate(substring(pubDate,0,$pubDateLength),number($rss_LCID),3)"/>
                    </xsl:when>
                    <xsl:otherwise>
                     <xsl:value-of select="ddwrt:FormatDate(dc:date,number($rss_LCID),3)"/>
                    </xsl:otherwise>
                </xsl:choose>

                <xsl:if test="string-length(description) &gt; 0">
                    <xsl:variable name="SafeHtml">
                        <xsl:call-template name="GetSafeHtml">
                            <xsl:with-param name="Html" select="description"/>
                        </xsl:call-template>
                    </xsl:variable>
                     - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                </xsl:if>
    <div class="description">
        <a href="{ddwrt:EnsureAllowedProtocol(string(link))}">More...</a>
        </div>
        </div>
        </xsl:template>


        <xsl:template name="RDFMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:variable name="Rows" select="rss1:item"/>
            <xsl:variable name="RowCount" select="count($Rows)"/>
            <div class="slm-layout-main" >
            <div class="groupheader item medium">
                <a href="{ddwrt:EnsureAllowedProtocol(string(rss1:channel/rss1:link))}">
                    <xsl:value-of select="rss1:channel/rss1:title"/>
                </a>
            </div>           
            <xsl:call-template name="RDFMainTemplate.body">
                <xsl:with-param name="Rows" select="$Rows"/>
                <xsl:with-param name="RowCount" select="count($Rows)"/>
            </xsl:call-template>
            </div>
        </xsl:template>

        <xsl:template name="RDFMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="Rows"/>
            <xsl:param name="RowCount"/>
            <xsl:for-each select="$Rows">
                <xsl:variable name="CurPosition" select="position()" />
                <xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
                <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
                <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
                    <div class="item link-item" >
                        <a href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" >
                            <xsl:value-of select="rss1:title"/>
                        </a>
                        <xsl:if test="$rss_ExpandFeed = true()">
                                <xsl:call-template name="RDFMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                        </xsl:if>
                        <xsl:if test="$rss_ExpandFeed = false()">
                                <xsl:call-template name="RDFMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                        </xsl:if>
                    </div>
</xsl:if>
            </xsl:for-each>
        </xsl:template>

<xsl:template name="RDFMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="DescriptionStyle"/>
            <xsl:param name="CurrentElement"/>
    <div id="{$CurrentElement}" class="description" align="$rss_alignValue" style="{$DescriptionStyle} text-align:{$rss_alignValue};">
    <xsl:value-of select="ddwrt:FormatDate(dc:date,number($rss_LCID),3)"/>
                <xsl:if test="string-length(rss1:description) &gt; 0">
                    <xsl:variable name="SafeHtml">
                        <xsl:call-template name="GetSafeHtml">
                            <xsl:with-param name="Html" select="rss1:description"/>
                        </xsl:call-template>
                    </xsl:variable>
                     - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                </xsl:if>
    <div class="description">
        <a href="{ddwrt:EnsureAllowedProtocol(string(rss1:link))}">More...</a>
        </div>
        </div>
        </xsl:template>


        <xsl:template name="ATOMMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:variable name="Rows" select="atom:entry"/>
            <xsl:variable name="RowCount" select="count($Rows)"/>
            <div class="slm-layout-main" >
            <div class="groupheader item medium">
                <a href="{ddwrt:EnsureAllowedProtocol(string(atom:link/@href))}">
                    <xsl:value-of select="atom:title"/>
                </a>
            </div>           
            <xsl:call-template name="ATOMMainTemplate.body">
                <xsl:with-param name="Rows" select="$Rows"/>
                <xsl:with-param name="RowCount" select="count($Rows)"/>
            </xsl:call-template>
            </div>
        </xsl:template>

        <xsl:template name="ATOMMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="Rows"/>
            <xsl:param name="RowCount"/>
            <xsl:for-each select="$Rows">
                <xsl:variable name="CurPosition" select="position()" />
                <xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
                <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
                <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
                            <div class="item link-item" >
                                <a href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" >
                                    <xsl:value-of select="atom:title"/>
                                </a>
                            <xsl:if test="$rss_ExpandFeed = true()">
                                <xsl:call-template name="ATOMMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                            <xsl:if test="$rss_ExpandFeed = false()">
                                <xsl:call-template name="ATOMMainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                            </div>
</xsl:if>
            </xsl:for-each>
        </xsl:template>

<xsl:template name="ATOMMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="DescriptionStyle"/>
            <xsl:param name="CurrentElement"/>
    <div id="{$CurrentElement}" class="description" align="$rss_alignValue" style="{$DescriptionStyle} text-align:{$rss_alignValue};">
<xsl:value-of select="ddwrt:FormatDate(atom:updated,number($rss_LCID),3)"/>
                <xsl:choose>
                    <xsl:when test="string-length(atom:summary) &gt; 0">
                        <xsl:variable name="SafeHtml">
                            <xsl:call-template name="GetSafeHtml">
                                <xsl:with-param name="Html" select="atom:summary"/>
                            </xsl:call-template>
                        </xsl:variable>
                         - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                    </xsl:when>
                    <xsl:when test="string-length(atom:content) &gt; 0">
                        <xsl:variable name="SafeHtml">
                            <xsl:call-template name="GetSafeHtml">
                                <xsl:with-param name="Html" select="atom:content"/>
                            </xsl:call-template>
                        </xsl:variable>
                         - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                    </xsl:when>
                </xsl:choose>
    <div class="description">
        <a href="{ddwrt:EnsureAllowedProtocol(string(atom:link/@href))}">More...</a>
        </div>
        </div>
        </xsl:template>

        <xsl:template name="ATOM2MainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:variable name="Rows" select="atom2:entry"/>
            <xsl:variable name="RowCount" select="count($Rows)"/>
            <div class="slm-layout-main" >
            <div class="groupheader item medium">               
                <a href="{ddwrt:EnsureAllowedProtocol(string(atom2:link/@href))}">
                    <xsl:value-of select="atom2:title"/>
                </a>
            </div>
            <xsl:call-template name="ATOM2MainTemplate.body">
                <xsl:with-param name="Rows" select="$Rows"/>
                <xsl:with-param name="RowCount" select="count($Rows)"/>
            </xsl:call-template>
            </div>
        </xsl:template>

        <xsl:template name="ATOM2MainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="Rows"/>
            <xsl:param name="RowCount"/>
            <xsl:for-each select="$Rows">
                <xsl:variable name="CurPosition" select="position()" />
                <xsl:variable name="RssFeedLink" select="$rss_WebPartID" />
                <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" />
                <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)">
                     <div class="item link-item" >
                                <a href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" >
                                    <xsl:value-of select="atom2:title"/>
                                </a>
                            <xsl:if test="$rss_ExpandFeed = true()">
                                <xsl:call-template name="ATOM2MainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                            <xsl:if test="$rss_ExpandFeed = false()">
                                <xsl:call-template name="ATOM2MainTemplate.description">
                                    <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
                                    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
                                </xsl:call-template>
                            </xsl:if>
                    </div>
</xsl:if>
            </xsl:for-each>
        </xsl:template>

<xsl:template name="ATOM2MainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
            <xsl:param name="DescriptionStyle"/>
            <xsl:param name="CurrentElement"/>
    <div id="{$CurrentElement}" class="description" align="$rss_alignValue" style="{$DescriptionStyle} text-align:{$rss_alignValue};">
    <xsl:value-of select="ddwrt:FormatDate(atom2:updated,number($rss_LCID),3)"/>
                <xsl:choose>
                    <xsl:when test="string-length(atom2:summary) &gt; 0">
                        <xsl:variable name="SafeHtml">
                            <xsl:call-template name="GetSafeHtml">
                                <xsl:with-param name="Html" select="atom2:summary"/>
                            </xsl:call-template>
                        </xsl:variable>
                         - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                    </xsl:when>
                    <xsl:when test="string-length(atom2:content) &gt; 0">
                        <xsl:variable name="SafeHtml">
                            <xsl:call-template name="GetSafeHtml">
                                <xsl:with-param name="Html" select="atom2:content"/>
                            </xsl:call-template>
                        </xsl:variable>
                         - <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/>
                    </xsl:when>
                </xsl:choose>
    <div class="description">
         <a href="{ddwrt:EnsureAllowedProtocol(string(atom2:link/@href))}">More...</a>
        </div>
        </div>
        </xsl:template>

        <xsl:template name="GetSafeHtml">
            <xsl:param name="Html"/>
            <xsl:choose>
                <xsl:when test="$rss_IsDesignMode = 'True'">
                     <xsl:value-of select="$Html"/>
                </xsl:when>
                <xsl:otherwise>
                     <xsl:value-of select="rssaggwrt:MakeSafe($Html)"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>

</xsl:stylesheet>
at 12/8/2007 6:56 AM

Re:XSLT

Has anyone tried using the above XSL?
at 12/9/2007 4:35 PM

Re: SharePoint 2007 RSS Aggregation Web Part

<color =rrrsada>fddsf
at 12/12/2007 1:33 AM

The remote server returned an error: (401) Unauthorized.

Hi,

I've added the part to my site, but no matter which feed I add, I receive the error above.

I have WSS3SP1 and the site has alternate access mapping, the sites are on ports 81 and 443. Thanks
at 5/6/2008 2:10 AM

Unable to connect to the remote server

hi,

I have added it into webpart i.e., how u mentioned like that only. I have not got any error like denied or any else
but its showing the message like above("Unable to connect to the remote server")

Thanks,
at 6/12/2009 5:30 AM

Conversion from vs2005 to vs2008

I need this webpart to be open in visual studio 2008.
I tried using conversion wizard provided by the visual studio 2008 . But I was not able to succeed.
I need help how to proceed with the conversion from vs 2005 to vs 2008.
at 11/6/2009 1:26 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Your Name


Your URL


Comment Date *

To prevent spam from automated bots please provide a valid date in the format "MM/DD/YYYY".
Attachments