xsl-list
[Top] [All Lists]

RE: [xsl] Merging multiple RSS feeds into one RSS feed

2006-04-18 12:21:15
Try showing us the output you would like to see. Then we can take your input 
and construct the template(s) necessary to do it.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Robert Fidler <robert(_dot_)fidler(_at_)queensu(_dot_)ca>
Sent:     Tue, 18 Apr 2006 14:31:25 -0400
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  [xsl] Merging multiple RSS feeds into one RSS feed

Does any one know how I can merge multiple RSS feeds into one feed? I 
have this code, but when I view the feed.xml in IE, it does not have any 
of the XML formating in it, just plain text output all strong out. And 
RSSOwl does not even read it.

feed.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="merge-rss.xsl"?>
<feeds>
    <link href="http://digg.com/rss/index.xml"/>
    <link href="http://www.osnews.com/files/recent.xml"/>
</feeds>

merge-rss.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    <xsl:output  method="xml" version="1.0" encoding="UTF-8" 
indent="yes" omit-xml-declaration="no" media-type="text/xml" />
    <xsl:template match="/">
        <rss version="2.0">
            <channel>
                <title>My Title</title>
                <description>My Description</description>
                <language>en-us</language>
                <link>http://mysite/rss</link>
                <xsl:for-each select="feeds/link/@href">
                    <xsl:copy-of select="document(.)/rss/channel/item"/>
                </xsl:for-each>
            </channel>
        </rss>
    </xsl:template>
</xsl:stylesheet>


Rob

--~------------------------------------------------------------------
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>
--~--




--~------------------------------------------------------------------
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>
--~--