From: Antonio Ospite <ao2@ao2.it> Date: Fri, 27 Feb 2015 12:59:38 +0000 (+0100) Subject: rss_converter_dilbert.com.xsl: make the feed validate with feedvalidator.org X-Git-Tag: v0.4~41 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/a2f080251d11941e8585e5a583919baf8c9a50f9 rss_converter_dilbert.com.xsl: make the feed validate with feedvalidator.org 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. --- diff --git a/rss_converter_dilbert.com.xsl b/rss_converter_dilbert.com.xsl index a12c44e..f255be1 100644 --- a/rss_converter_dilbert.com.xsl +++ b/rss_converter_dilbert.com.xsl @@ -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> @@ -80,6 +84,12 @@ <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>