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 FeedsGoing Crazy! Data is not displayedGoing Crazy! Data is not displayed
Previous
 
Next
New Post
2/19/2009 4:59 AM
 

 I'm running on DNN 4.8 using the latest version of the news module.  If I use one of the default xsl files along with my newfeed source I'm golden.  Everything works fine.  However, I would like to customize the output for that feed so I'm trying to create a customized xsl file.  It's pretty simple and I've stripped out everything but the basics -- what am I doing wrong?

The XSL file is as follows:

<?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:template match="rss">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<xsl:for-each select="channel/item">
<tr>
<td><xsl:value-of select="agent" disable-output-escaping="yes" /></td>
<td><xsl:value-of select="direct" disable-output-escaping="yes" /></td>
<td><xsl:value-of select="cell" disable-output-escaping="yes" /></td>
<td><xsl:value-of select="email" disable-output-escaping="yes" /></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>

The RSS source looks as follows:

<rss version="2.0">
<channel>
<item>
<agent>Joe Blow1</agent>
<direct />
<cell>(361) 333-3333</cell>
<email>
<a href='http://joeblow@stx.rr.com' target="_blank">joeblow@stx.rr.com</a>
</email>
</item>
<item>
<agent>Joe Blow2</agent>
<direct />
<cell>(361) 333-3333</cell>
<email>
<a href='http://joeblow@stx.rr.com' target="_blank">joeblow@stx.rr.com</a>
</email>
</item>
</channel>
</rss>
 

Thanks for your help.


http://www.idsconsulting.com Ideas, Design, Success.
 
New Post
2/19/2009 9:02 AM
 

First, I don't mean any of my response to be taken as an insult to you.  So, with that in mind...

I'm going to recommend that you read up on RSS and newsfeeds in general.  There are a lot of good resources available to help you understand the various components of a newsfeed, and how to present them.  These forums contain a lot of examples, too.  On my blog, I've listed some useful site links for RSS info, so if you don't have any links of your own check it out.  Also on my blog are more articles that can help you move forward in the learning curve, 'how to find the rss version of your feed', and info on what kinds of tools I use, 'useful developer tools'.  One of the most useful sites I've used for rss, is the W3C Feed Validation Service, which will validate RSS and Atom feeds, pointing out the issue that are troublesome.

Now, as far as your 'feed' goes, I see some issues.  The first thing about I noticed is that it really isn't an RSS feed, although you use the RSS tag to indicate that it is an rss v2.0 spec feed.  The 'data' you represent is not part of the rss spec, so it would never show up using DNN's default xsl, which will only render RSS v2.0 spec items for title, link, and description.  What you represent is better suited to using the XML/XSL module.  You seem to be confusing RSS with XML.  RSS is a subset of XML, with defined specifications, and the latest version of the DNN News module will render RSSv2.0 spec feeds, but it would not render this one due to your 'data' fields like 'agent', 'cell', 'direct', which are not RSSv2.0 tags.

Try using the XML/XSL module to do your custom work with rendering data islands.  Again, though you'll need to bone up on XML, and XSL.  The good news is that I think your XSL would render the data, but you are going to need some work on it, as it needs to follow some basic specs too.  Try using the Top XML or any of a number of other XML/XSL sites that go over XML/XSL stuff. 

Cheers,

 

 
New Post
2/19/2009 12:38 PM
 

Hello iwonder,

Thanks for taking the time to respond with such a well thought out and detailed response.  I'm reading the links you suggested and they are helpful.  You are correct, I'm approaching RSS like I would a regular XML file.  I'm still reading, but I have another quick question -- is it not possible then to use custom data fields that are not RSS 2.0 tags?  i.e. data' fields like 'agent', 'cell', 'direct'.  Or am I just approaching this the wrong way -- perhaps I just need to call these data fields something else?  I guess what I'm really trying to do is fit a square peg in a round hole.  I'm using a module that offers RSS syndication, but does not offer a direct XML output.  What I'm really trying to do is get a subset of the data that it normally displays and format it on a page the way I want.  I was hoping RSS would do the trick.


http://www.idsconsulting.com Ideas, Design, Success.
 
New Post
2/19/2009 1:37 PM
 

Shawn,

It is possible to add custom tags for use with RSS feeds, which is done by adding them in a custom namespace.  That's a bit more advanced, but that's how a lot of news providers do it. Folks like Google, Weather providers and the like extend RSS by developing a custom namespace.  The biggest problem with doing it is using the newest version of DNN's news module.  The reason being that there is no allowance for using custom namespaces in the current version.   That lack of support is most probably due to the effort to provide the feed aggregation features.  In short, when a collection of feeds is setup for use in the module, there needs to be some refactoring of the incoming feed and it is rewritten to what I call a 'DNN RSSv2.0' feed.  Each feed can be of a different format, RSS, Atom, or OPML.  The problem is how to piece them all together and render them for syndication.  The method being used in the News module takes these feeds, analyzes them for conformance to the feeds specifications, then, if possible takes the most basic common tags to re-write it into that DNN RSSv2.0 type feed, so it can all be rendered.  Now, the actual re-write will include only the very basics of an RSS feed, and really resembles the RSSv0.91 feed spec more than RSSv2.0, you'll get title, description, pubDate, and link, but little else - if that.   Unfortunately, any custom namespace tages in the original feed are tossed out for lack of support. 

Early on, in my tests of the new version of the News module, I had some issues with this approach, and for some of my work, I actually, did not opt to upgrade to the new version, prefering to keep the ability to customize the rendering xsl available.  I do not need the aggregation features of the new module, and really find it not helpful for most of the situations I encounter.  I put forward a suggestion to offer a choice of using aggregation or not, but it is hard to go back without a lot of effort and time to do it. 

So, I can appreciate the need to customize a newsfeed adding a custom namespace with unique tags, but the current newest version will not support it.  It's a good topic, though and I'll provide some discussion of how to do it with the older news v3.x module on my blog, if you are interested.

 
New Post
2/20/2009 2:10 AM
 

Thanks again for a great post.  I wouldn't mind reading that from your blog if you are so inclined to put that together.  I would think others would benefit as well.  I ended up using the XML module to consume the "RSS" feed.  Worked like a champ in combination with the XSL file.  Thanks for pointing me in the right direction -- although you probably didn't intend for me to go down that road, your comments definitely helped.


http://www.idsconsulting.com Ideas, Design, Success.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsGoing Crazy! Data is not displayedGoing Crazy! Data is not displayed


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