rss_converter_twitter.com.xsl: add a mode attribute to the enclosure template
authorAntonio Ospite <ao2@ao2.it>
Wed, 18 May 2016 11:28:01 +0000 (13:28 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 20 May 2016 13:03:40 +0000 (15:03 +0200)
This is needed because another template with
match="a[@data-expanded-url]" will be added in a future commit.

rss_converter_twitter.com.xsl

index b7c7124..1903607 100644 (file)
@@ -32,7 +32,7 @@
         <xsl:text>https://twitter.com</xsl:text>
     </xsl:variable>
 
-    <xsl:template match="a[@data-expanded-url]">
+    <xsl:template match="a[@data-expanded-url]" mode="enclosure">
         <xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(./@data-expanded-url))"/>
     </xsl:template>
 
@@ -73,7 +73,7 @@
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
             <xsl:if test="$generate-enclosure = 1">
-                <xsl:apply-templates select="$item-content//a[@data-expanded-url]"/>
+                <xsl:apply-templates select="$item-content//a[@data-expanded-url]" mode="enclosure"/>
             </xsl:if>
         </item>
     </xsl:template>