Permalink
Browse files

Fixed date in RSS. Default to updated if published not found.

  • Loading branch information...
1 parent 1718d63 commit 430450f76679f1b024656de8ae5251e243ae4b1e Dmitry Baranovskiy committed May 25, 2009
Showing with 11 additions and 1 deletion.
  1. +11 −1 rss-mf.xsl
View
@@ -39,7 +39,17 @@
</xsl:otherwise>
</xsl:choose>
</description>
- <pubDate><xsl:value-of select="published/@date"/></pubDate>
+ <xsl:variable name="pubDate">
+ <xsl:choose>
+ <xsl:when test="published/@date">
+ <xsl:value-of select="published/@date"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="updated/@date"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <pubDate><xsl:value-of select="$pubDate"/></pubDate>
<guid isPermaLink="false">
<xsl:value-of select="bookmark/@href"/>
<xsl:value-of select="published/@date"/>

0 comments on commit 430450f

Please sign in to comment.