From: Antonio Ospite <ao2@ao2.it>
Date: Fri, 4 Nov 2016 17:02:11 +0000 (+0100)
Subject: rss_converters_*.xsl: prefix the namespace when calling Tweeper class methods
X-Git-Tag: v1.0.0~11
X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/57535fd5825c6c112b6489c27e469bc4143c1a2e?ds=sidebyside

rss_converters_*.xsl: prefix the namespace when calling Tweeper class methods

The Tweeper class is now in a namespace, without this change the XSLT
processor would give errors like this:

PHP Warning:  XSLTProcessor::transformToXml(): Unable to call handler Tweeper::epochToRssDate() in .../src/Tweeper.php on line 356
---

diff --git a/src/rss_converter_dilbert.com.xsl b/src/rss_converter_dilbert.com.xsl
index b6d1975..d340183 100644
--- a/src/rss_converter_dilbert.com.xsl
+++ b/src/rss_converter_dilbert.com.xsl
@@ -67,7 +67,7 @@
                 <xsl:value-of select="$item-permalink"/>
             </guid>
             <pubDate>
-                <xsl:value-of select="php:functionString('Tweeper::strToRssDate', normalize-space(.//date))"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::strToRssDate', normalize-space(.//date))"/>
             </pubDate>
             <description>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
@@ -75,7 +75,7 @@
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
             <xsl:if test="$generate-enclosure = 1">
-                <xsl:copy-of select="php:functionString('Tweeper::generateEnclosure', $picture-url)"/>
+                <xsl:copy-of select="php:functionString('Tweeper\Tweeper::generateEnclosure', $picture-url)"/>
             </xsl:if>
         </item>
     </xsl:template>
diff --git a/src/rss_converter_facebook.com.xsl b/src/rss_converter_facebook.com.xsl
index 418b3d2..933d3d2 100644
--- a/src/rss_converter_facebook.com.xsl
+++ b/src/rss_converter_facebook.com.xsl
@@ -85,7 +85,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select=".//abbr[@data-shorten]/@data-utime"/>
-                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', $timestamp)"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::epochToRssDate', $timestamp)"/>
             </pubDate>
             <description>
 
diff --git a/src/rss_converter_howtoons.com.xsl b/src/rss_converter_howtoons.com.xsl
index 403b9ac..35a6739 100644
--- a/src/rss_converter_howtoons.com.xsl
+++ b/src/rss_converter_howtoons.com.xsl
@@ -57,7 +57,7 @@
                 <xsl:variable name="day" select="substring($date, 4, 2)"/>
                 <xsl:variable name="year" select="substring($date, 7, 2)"/>
                 <xsl:variable name="iso-date" select="concat('20', $year, '-', $month, '-', $day)"/>
-                <xsl:value-of select="php:functionString('Tweeper::strToRssDate', $iso-date)"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::strToRssDate', $iso-date)"/>
             </pubDate>
             <description>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
diff --git a/src/rss_converter_instagram.com.xsl b/src/rss_converter_instagram.com.xsl
index e869d7d..609be66 100644
--- a/src/rss_converter_instagram.com.xsl
+++ b/src/rss_converter_instagram.com.xsl
@@ -75,7 +75,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select="./date"/>
-                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', $timestamp)"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::epochToRssDate', $timestamp)"/>
             </pubDate>
             <description>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
@@ -89,7 +89,7 @@
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
             <xsl:if test="$generate-enclosure = 1">
-                <xsl:copy-of select="php:functionString('Tweeper::generateEnclosure', $item-content-image)"/>
+                <xsl:copy-of select="php:functionString('Tweeper\Tweeper::generateEnclosure', $item-content-image)"/>
             </xsl:if>
         </item>
     </xsl:template>
diff --git a/src/rss_converter_pump.io.xsl b/src/rss_converter_pump.io.xsl
index 1577dcf..bf9f674 100644
--- a/src/rss_converter_pump.io.xsl
+++ b/src/rss_converter_pump.io.xsl
@@ -46,7 +46,7 @@
                 <xsl:value-of select="$item-permalink"/>
             </guid>
             <pubDate>
-                <xsl:value-of select="php:functionString('Tweeper::strToRssDate', .//abbr[@class='easydate']/@title)"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::strToRssDate', .//abbr[@class='easydate']/@title)"/>
             </pubDate>
             <description>
                 <xsl:value-of select="concat($user-name, ': ')"/>
@@ -58,7 +58,7 @@
                 <xsl:variable name="image-thumb-link" select=".//img[contains(@class, 'object-image')]/@src"/>
                 <xsl:if test="$image-thumb-link">
                     <xsl:variable name="image-link" select="php:functionString('str_replace', '_thumb', '', $image-thumb-link)"/>
-                    <xsl:copy-of select="php:functionString('Tweeper::generateEnclosure', $image-link)"/>
+                    <xsl:copy-of select="php:functionString('Tweeper\Tweeper::generateEnclosure', $image-link)"/>
                 </xsl:if>
             </xsl:if>
         </item>
diff --git a/src/rss_converter_twitter.com.xsl b/src/rss_converter_twitter.com.xsl
index c154141..58539ae 100644
--- a/src/rss_converter_twitter.com.xsl
+++ b/src/rss_converter_twitter.com.xsl
@@ -104,11 +104,11 @@
     </xsl:template>
 
     <xsl:template match="a[@data-expanded-url]" mode="enclosure">
-        <xsl:copy-of select="php:functionString('Tweeper::generateEnclosure', ./@data-expanded-url)"/>
+        <xsl:copy-of select="php:functionString('Tweeper\Tweeper::generateEnclosure', ./@data-expanded-url)"/>
     </xsl:template>
 
     <xsl:template match="div[@data-image-url]" mode="enclosure">
-        <xsl:copy-of select="php:functionString('Tweeper::generateEnclosure', concat(./@data-image-url, ':orig'))"/>
+        <xsl:copy-of select="php:functionString('Tweeper\Tweeper::generateEnclosure', concat(./@data-image-url, ':orig'))"/>
     </xsl:template>
 
     <xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/>
@@ -145,7 +145,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select=".//span[contains(@class, 'js-short-timestamp')]/@data-time"/>
-                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', number($timestamp))"/>
+                <xsl:value-of select="php:functionString('Tweeper\Tweeper::epochToRssDate', number($timestamp))"/>
             </pubDate>
             <description>
                 <xsl:value-of select="concat($user-name, ': ')"/>