rss_converter_dilbert.com.xsl: make the feed validate with feedvalidator.org
authorAntonio Ospite <ao2@ao2.it>
Fri, 27 Feb 2015 12:59:38 +0000 (13:59 +0100)
committerAntonio Ospite <ao2@ao2.it>
Fri, 27 Feb 2015 13:01:01 +0000 (14:01 +0100)
Make the Dilbert.com feed validate with http://feedvalidator.org and also
improve compatibility by providing a guid and by excluding the weird
xmlns:php namespace in the output.

rss_converter_dilbert.com.xsl

index a12c44e..f255be1 100644 (file)
@@ -34,7 +34,8 @@
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:php="http://php.net/xsl"
-    xsl:extension-element-prefixes="php">
+    xsl:extension-element-prefixes="php"
+    exclude-result-prefixes="php">
 
     <xsl:output method="xml" indent="yes"/>
 
@@ -51,6 +52,9 @@
             <link>
                 <xsl:value-of select="$item-permalink"/>
             </link>
+            <guid>
+                <xsl:value-of select="$item-permalink"/>
+            </guid>
             <pubDate>
                 <xsl:value-of select="php:functionString('Tweeper::str_to_gmdate', normalize-space(.//date))"/>
             </pubDate>
                     <xsl:value-of select="//meta[@property='og:description']/@content"/>
                 </description>
                 <image>
+                    <title>
+                        <xsl:value-of select="$channel-title"/>
+                    </title>
+                    <link>
+                        <xsl:value-of select="$channel-link"/>
+                    </link>
                     <url>
                         <xsl:value-of select="concat($BaseURL, //img[@alt='Dilbert logo']/@src)"/>
                     </url>