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 FeedsNewsFeed (RSS) DNN Not Displaying ContentNewsFeed (RSS) DNN Not Displaying Content
Previous
 
Next
New Post
1/28/2006 11:12 PM
 

Greetings!

I am trying to incorporate an RSS News Feed module pointing to the BibleGateway.com Verse of the Day.

Here is what their feed renders:

<?xml version="1.0" ?>
             <rss version="2.0"
     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:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:content="
http://purl.org/rss/1.0/modules/content/">
     
                 <channel>
                    <title>Bible Gateway's Verse of the Day</title>
                 <link>http://www.biblegateway.com</link>
                    <description>A daily word of exultation.</description>
     <dc:language>en-us</dc:language>
        <dc:creator>BibleGateway.com</dc:creator>
        <dc:rights>Copyright 2004</dc:rights>
        <dc:date>2006-01-28T09:35:23Z</dc:date>
        <sy:updatePeriod>daily</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>
     <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
      
                 <item>
                   <title>John 4:24</title>
                   <description>Verse of the day</description>
                      <guid isPermaLink="true">http://www.biblegateway.com/passage/?search=John 4:24&amp;version=31</guid>
      <content:encoded>
       <![CDATA[&ldquo; God is spirit, and his worshipers must worship in spirit and in truth.&rdquo;<br/><br/> Brought to you by <a href="
http://www.biblegateway.com">BibleGateway.com</a>. Copyright (C) NIV. All Rights Reserved.]]>
      </content:encoded> 
         <dc:rights>Powered by BibleGateway.com</dc:rights>
      <dc:date>2006-01-28T09:35:23Z</dc:date>
                    </item>
                </channel>
                 </rss>

 

 

 

I have created a BibleGateway.xsl file that looks like this:

<?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">
  <xsl:for-each select="channel/item">
    <br>
    Read the Bible Daily!<br></br>
    <strong><xsl:value-of select="title"/></strong><br></br>
    <xsl:value-of select="content"/><br></br>

    </br>
    <br></br>
  </xsl:for-each>
</xsl:template>

<xsl:template match="description">
  <br>
    <xsl:value-of select="."/>
  </br>
</xsl:template>

</xsl:stylesheet>

 

The problem is, If I try to use the <content> tag, nothing is displayed. Using the <content:encoded> tag blows up the site completely...

 

Ideas?

 
New Post
1/29/2006 4:10 PM
 
<?xml version="1.0" ?>
             <rss version="2.0"
     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:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:content="
http://purl.org/rss/1.0/modules/content/">
     
One thing to remember when creating custom xsl files for a newsfeed is to include the needed namespaces references.  If you use a tag described in one of these namespaces, then you must reference in your xml declaration.  The above xml declaration is from the news feed you cite, but in your xsl you never reference it.  That's the reason why the content tag is not being interpreted.  There may be other issues beyond this one, but that's going to need correcting.  At any rate, I recommend including the namespace for the content tag, and try it again.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsNewsFeed (RSS) DNN Not Displaying ContentNewsFeed (RSS) DNN Not Displaying Content


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