Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsfeeds always render unformattedfeeds always render unformatted
Previous
 
Next
New Post
1/8/2006 10:39 AM
 

Hi!

I've just set up my first, fresh DNN 4.0.2 installation and everything but the News-module works fine. Regardless of which RSS-feed I choose (e.g. http://www.heise.de/newsticker/heise.rdf), the output on my page is always "unformatted":

heise online Newshttp://www.heise.de/newsticker/Nachrichten nicht nur aus der Welt der ComputerAuch LG Electronics vor dem großen Sprunghttp://www.heise.de/newsticker/meldung/68110Google bietet europäischen Regierungen Kooperation

My RSS91.xsl contains the following lines:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:param name="TITLE"/>
<xsl:template match="rss">
<!-- Do not show channel image -->
<xsl:for-each select="channel/item">
<xsl:if test="position() &lt;= 5">
<br>
<strong>
<a href="{link}" target="_main">
<xsl:value-of select="title"/>
</a>
</strong>
<br></br>
<!-- only display markup for description if it's present -->
<xsl:value-of select="description" disable-output-escaping="yes"/>
</br><br></br>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="description">
<br>
<xsl:value-of select="."/>
</br>
</xsl:template>
</xsl:stylesheet>

What can I do?

 
New Post
3/24/2006 11:27 AM
 

The main issue is using a suitable xsl to perform the translation.  I'll update this post with a newer version of an rdf xsl that will work.  Right now, the existing example won't due to the way this feed is structured.  I find that it is often the case that a newsfeed will require a custom xsl due to the many variances in the way feeds are constructed.

There are so many ways a newsfeed generator can create a feed, and not all follow the specs, though they do pass verification.  Why?  Well, it's really in the elements used and the namespaces defined.  Well-formed xml doesn't always mean that a feed is going to be translated automatically.  In DNN the default xsl is compatible with simple RSSv0.91 version newsfeeds.  The feed mentioned here is an RDF feed that requires different namespaces and uses a very simple structure.  So, I'll post the update later today.

 
New Post
3/24/2006 1:08 PM
 

As promised, here's an example custom xsl that will render the above mentioned feed.  Cut and paste the code to your favorite text editor, save the file, and then you can upload it to your portal.  Then, you can select it for use with that newsfeed.

<?xml version="1.0" encoding="ISO-8859-1"?>
<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:rss09="http://my.netscape.com/rdf/simple/0.9/" >
<!-- customRDF - a custom RDF stylesheet - Phil 'iwonder' Guerra -->
<xsl:output omit-xml-declaration="yes"/>

<xsl:template match="/">
                <div>
                <xsl:apply-templates select="rdf:RDF/rss09:channel" />
      </div>
     <hr/>
               <center><font size="1">(CustomRDF by <i>iwonder</i>)</font></center>     
</xsl:template>

<xsl:template match="rdf:RDF/rss09:channel">
                <xsl:variable name="link" select="rss09:link"/>
                <xsl:variable name="description" select="rss09:description"/>
         <font size="2"><xsl:value-of select="rss09:description" /></font>
                <hr/>
     <div>
                        <ul><xsl:apply-templates select="/rdf:RDF/rss09:item"/></ul>
     </div>
</xsl:template>

<xsl:template match="rss09:item">
                <xsl:variable name="item_link" select="rss09:link"/>
                <xsl:variable name="item_title" select="rss09:description"/>
                <li><a href="{$item_link}" title="{$item_title}"><xsl:value-of select="rss09:title"/></a></li>
</xsl:template>

</xsl:stylesheet>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsfeeds always render unformattedfeeds always render unformatted


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out