Hi Pawan,
i used a target dynament in delivery server to create a xml that
contains all items for my feed:
<?xml version="1.0" encoding="UTF-8" ?>
<rss>
<rde-dm:target tag="item" include-mode="content-reference"
attributepath="search.kb" chunksize="15"
sortedby="search.kb.contentCreate" sortorder="desc">
<rde-dm:constraint>
(content.search.kb.contentCategory contains "KB-
Type:Press") OR (content.search.kb.contentCategory contains "KB-
Type:News")
</rde-dm:constraint>
</rde-dm:target>
</rss>
This xml is then rendered with the following xsl stylsheet:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xsl:output method="xml"/>
<rde-dm:attribute mode="xslparam" attribute="rdeHttpServer" />
<xsl:template match="rss">
<rss version="2.0"><xsl:text>
</xsl:text><channel><xsl:text>
</xsl:text><title>semikron.com - News, Press, Events, Fairs
(ENG)</title><xsl:text>
</xsl:text><link><xsl:value-of
select="substring($rdeHttpServer, 0, string-length($rdeHttpServer) -
4)"/></link><xsl:text>
</xsl:text><description>semikron.com - News, Press, Events,
Fairs (ENG)</description><xsl:text>
</xsl:text><language>en</language><xsl:text>
</xsl:text><pubDate><xsl:value-of select="item/rde-
rd:targetresult-item/rde-rd:contentattributes/rde-rd:attribute/rde-
rd:attribu...@name='contentPub']" /></pubDate><xsl:text>
</xsl:text><copyright>SEMIKRON International GmbH & Co.
KG</copyright><xsl:text>
</xsl:text><xsl:for-each select="item/rde-rd:targetresult-
item"><item><xsl:text>
</xsl:text><title><xsl:value-of select="rde-
rd:contentattributes/rde-rd:attribute/rde-
rd:attribu...@name='contentTitle']" /></title><xsl:text>
</xsl:text><link><xsl:value-of
select="substring($rdeHttpServer, 0, string-length($rdeHttpServer) -
4)"/><xsl:value-of select="rde-rd:contentattributes/rde-rd:attribute/
rde-rd:attribu...@name='contentLink']" /></link><xsl:text>
</xsl:text><description><xsl:value-of select="rde-
rd:contentattributes/rde-rd:attribute/rde-
rd:attribu...@name='contentSubtitle']" /></description><xsl:text>
</xsl:text><pubDate><xsl:value-of select="rde-
rd:contentattributes/rde-rd:attribute/rde-
rd:attribu...@name='contentPub']" /></pubDate><xsl:text>
</xsl:text><guid>http://www.semikron.com<xsl:value-of
select="rde-rd:contentattributes/rde-rd:attribute/rde-
rd:attribu...@name='contentLink']" /></guid><xsl:text>
</xsl:text></item></xsl:for-each><xsl:text>
</xsl:text></channel><xsl:text>
</xsl:text></rss>
</xsl:template>
</xsl:stylesheet>
This returns a valid rss 2.0 feed that works in IE 7, IE 8 and Firefox
3.6. I did not test other browsers yet.
I hope that helps you to fix your problem.
Regards,
Stefan
On Feb 16, 6:11 pm, Pawan <[email protected]> wrote:
> Hi
>
> I am trying to implement RSS feeds for news section of our site.
> Before going to implementation I am trying to do a POC with a smalll
> static RSS feed. I named the file abc_news.xml (with type XML in Live
> Server) and added following content:
> <?xml version="1.0"?>
> <rss version="2.0">
> <channel>
> <title>IBN Top Headlines</title>
> <description>Latest News from IBNLive.com</description>
> <link>http://www.ibnlive.com/index.html</link>
>
> <item>
> <title>TDP MLAs quit over Telangana, Cong won't</title>
> <link>http://www.ibnlive.com/news/</link>
> <description>Committee heading movement separate state on
> verge of split.</description>
>
> </item>
>
> </channel>
> </rss>
>
> Now, when i hit this xml in Firefox it works fine, but when I hit this
> in IE7 it gives me following error:
> Internet Explorer cannot display this feed
>
> Internet Explorer does not support feeds with DTDs.
> Go back to the previous page.
>
> More information
>
> This feed contains a DTD (Document Type Definition). DTDs are used to
> define a structure of a webpage. Internet Explorer does not support
> DTDs in feeds.
>
> I tried to host this rss feed directly through IIS and from there it
> works fine in both FF and IE. So I am sure problem is something
> specific to Live Server.
>
> If anyone has encountered a similar problem or any any inputs then
> please share.
>
> Regards
> Pawan
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.