xsl-list
[Top] [All Lists]

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

2006-04-18 13:06:55
On 4/18/06, Nic <nferrier(_at_)tapsellferrier(_dot_)co(_dot_)uk> wrote:
Robert Fidler <robert(_dot_)fidler(_at_)queensu(_dot_)ca> writes:

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.


The transformation seems to work fine for me.  What type of formatting
are you expecting?  Remember, you are generating an XML document.  
The fact that you're seeing the text but only as unformatted probably
means it's working.  I believe IE always displays raw xml that is a
result of a transformation in that manner (Doesn't show the tags but
just text).  As for RSSOwl not reading it, who knows.  Might not be
handling the namespaces correctly.

My advice?  Same as always, don't use the browser to transform until
you know your stylesheet is working.  Using a command-line tool is the
best, Oxygen or another if you would rather.  If you absolutely must
use the browser, find a "view generated source" type of plugin.

Something like:

  <xsl:for-each select="feeds/link">
    <xsl:variable name="source" select="document(@href)"/>
    <xsl:copy-of select="$source//item"/>
  </xsl:for-each>

Works for me.


How is that any different?  It'll give you the exact same thing,
except you're putting the document into a variable and then using //. 
There's a good chance on some processors your suggestion is even
slower.  I'd probably go with what the OP had with in the first place.

Jon Gorman

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