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 FeedsAtom newsfeedAtom newsfeed
Previous
 
Next
New Post
5/12/2007 2:16 AM
 

Anybody has any luck transforming an Atom newsfeed. Seems this is what Google is using for Google Reader's "shared items"

Thanks
Matt

 
New Post
5/14/2007 2:43 PM
 

Well, you just need a custom xsl to translate the feed.  Post a sample link, and I'll take a look.  I'm pretty sure I posted a sample xsl a while back that transforms Atom feeds.

Cheers

 
New Post
5/14/2007 3:01 PM
 

Ok, here's an example xsl for those Google 'shared' feeds.  It just does a simple list of the feeds aggregatted by the google user. Nothin' fancy, but a start anyway. An interesting feature, at least to me, is the Google feed generator is using a Yahoo namespace for video items.

 <?xml version="1.0" encoding="utf-8"?>
<!-- sample GoogleReaderNews.xsl by Phil 'iwonder' Guerra -->
<xsl:stylesheet version="1.0"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:gr="http://www.google.com/schemas/reader/atom/"
    xmlns:media="http://video.yahoo.com/mrss">
   <xsl:output method="html"/>
 <xsl:template match="/">
  <style>
   <xsl:comment>
   .syndication-content-area {
   }
   .syndication-title {
    font-size: 1.1em;
    font-weight: bold;
   }
   .syndication-description {
    font-size: .9em;
    margin: 0 0 10px 0;
   }
   .syndication-list {
    font-size: .8em;
    margin:0 0 0 20px;
   }
   .syndication-list-item {
    margin: 0 0 5px 0;
   }
   .syndication-list-item a,
   .syndication-list-item a:link {
    color: blue;
   }
   .syndication-list-item a:active,
   .syndication-list-item a:hover {
    color: red;
   }
   .syndication-list-item a:visited {
    color: black;
    text-decoration: none;
   }
   .syndication-list-item-date {
    font-size: .8em;
   }
   .syndication-list-item-description {
    font-size: .9em;
   }
   </xsl:comment>
  </style>
  <xsl:apply-templates select="/atom:feed"/>
 </xsl:template>
 <xsl:template match="/atom:feed">
  <div class="syndication-content-area">
   <div class="syndication-title">
    <xsl:value-of select="atom:title"/>
   </div>
   <div class="syndication-description">
    <xsl:value-of select="atom:tagline"/>
   </div>
   <ul class="syndication-list">
    <xsl:apply-templates select="atom:entry"/>
   </ul>
  </div>
 </xsl:template>
 <xsl:template match="atom:entry">
  <li class="syndication-list-item">
   <a href="{atom:link/@href}">
    <xsl:value-of select="atom:title"/>
   </a>
<!--   <div class="syndication-list-item-description">
    <xsl:value-of select="atom:summary"/>
   </div>
-->
  </li>
 </xsl:template>
</xsl:stylesheet>

 

Now, to see some detail under the title/link, just uncomment the syndication-list-item-description and/or replace it with this code

   <div class="syndication-list-item-description">
    <xsl:value-of select="atom:summary" disable-output-escaping="yes"/>
   </div>

There's a lot of html in these feeds so the usual cavaets regarding security are applicable.  One usage might be to create your own favorite news items in such a feed, then use the standard DNN news module with this xsl to create a cool agregatted list.  It seems to be pretty handy.

Cheers

 
New Post
5/14/2007 5:50 PM
 

Phil, thanks. That rocks.

Yes, I use Google reader for reading my newsfeeds. When I come across something interesting, I "share" it which adds the item to my own shared newsfeed. My colleagues have then subscribed ot my newsfeed (as have I to theirs) and we share stuff back and forth...

This way, I can automatically share stuff to my website...

Thanks again
Matt

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsAtom newsfeedAtom newsfeed


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