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 FeedsConsuming a Blogger blogConsuming a Blogger blog
Previous
 
Next
New Post
2/16/2009 9:57 AM
 

First, the blogspot feeds (blogger) are already atom v1.0 format.  The problem from what I see is the way the feed is being generated when used for posting from Outlook.  The content includes all of the HTML formatting generated by that application.  Like most MS Office style apps, it can be used, but you pay a penalty in with the inclusion of all of the markup done within that app.  Looking at the raw source shows all of the HTMl from those posts have ms html included, so you would need to strip it all out to just bare text, or somehow change the way the post gets send from Outlook.  Haven't done much work with sending posts from Email, so I don't know if that can be done or not.  First guess, is maybe look for an option to send text only rather than any markup.  The other option would be to strip the HTML from the content with an xsl, which I can work on.

Cheers,

 
New Post
2/16/2009 10:14 AM
 

Ok, so here's a first pass for you to test.  The xsl appears below with sample output.  It's not pretty, but you can change the included style formatting to suit.  The other problem which I've not addressed is allowing cr/lf html.  What this xsl does is just filter all HTML, so even br's are filtered.  This was just a quick way to show you the direction headed.

<?xml version="1.0" encoding="utf-8"?>
<!-- Blogger Feed From Email with HTML Stripped -->
<!-- Phil 'iwonder' Guerra -->
<!-- 2009-02-16 -->
<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/">
   <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-content-area ">
            <xsl:call-template name="strip_HTML">
                <xsl:with-param name="value" select="atom:content" />
            </xsl:call-template>
        </div>
   </li>
</xsl:template>
 
<xsl:template name="strip_HTML">
<xsl:param name="value"/>
<xsl:choose>
<xsl:when test="contains($value,'&lt;')">
<xsl:value-of select="substring-before($value,'&lt;')" disable-output-escaping="yes"/>
<xsl:choose>
<xsl:when test="contains(substring-after($value,'&lt;'),'&gt;')">
<xsl:call-template name="strip_HTML">
<xsl:with-param name="value"><xsl:value-of select="substring-after($value,'&gt;')"/></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value" disable-output-escaping="yes"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>

Sample Output

 
New Post
2/17/2009 8:01 AM
 

Phil, this is actually a lot better than anything I had came up with at this point. I could probably make this work. I need to convince him that he needs to just log into the portal and submit his content there so we don't have to worry about all this MS generated HTML, but I don't know if that is gong to be an option.

 
New Post
2/17/2009 9:44 AM
 

Oh how I understand that situation.  I work for a director that maintains the view - 'we are not in the software development business'.  Yet, everytime there is an issue that our clinical information system cannot provide, he turns to me and asks - 'can you do anything about this issue?'  I've tried to tell him that 80% of my duties as a system administrator are focused on providing automation to improve system performance, monitoring, and usability.  Of course, he does not acknowledge those facts, and so provides me very little in the way of tools to do my job.  If I had not grabbed hold of DNN and other MS .Net tools at various seminars, and recycle a old workstation, load it with linux, we'ld not have any of the tools that help folks do their jobs around here at the system level.  Thanks for .Net, KSH, and XML/XSL tools.

Glad it could help you.

Cheers!

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsConsuming a Blogger blogConsuming a Blogger blog


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