rss_converters_*.xsl: prefix the namespace when calling Tweeper class methods
authorAntonio Ospite <ao2@ao2.it>
Fri, 4 Nov 2016 17:02:11 +0000 (18:02 +0100)
committerAntonio Ospite <ao2@ao2.it>
Sat, 5 Nov 2016 21:57:29 +0000 (22:57 +0100)
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

src/rss_converter_dilbert.com.xsl
src/rss_converter_facebook.com.xsl
src/rss_converter_howtoons.com.xsl
src/rss_converter_instagram.com.xsl
src/rss_converter_pump.io.xsl
src/rss_converter_twitter.com.xsl

index b6d1975..d340183 100644 (file)
@@ -67,7 +67,7 @@
                 <xsl:value-of select="$item-permalink"/>
             </guid>
             <pubDate>
                 <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>
             </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: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>
             </xsl:if>
         </item>
     </xsl:template>
index 418b3d2..933d3d2 100644 (file)
@@ -85,7 +85,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select=".//abbr[@data-shorten]/@data-utime"/>
             </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>
 
             </pubDate>
             <description>
 
index 403b9ac..35a6739 100644 (file)
@@ -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: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>
             </pubDate>
             <description>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
index e869d7d..609be66 100644 (file)
@@ -75,7 +75,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select="./date"/>
             </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>
             </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: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>
             </xsl:if>
         </item>
     </xsl:template>
index 1577dcf..bf9f674 100644 (file)
@@ -46,7 +46,7 @@
                 <xsl:value-of select="$item-permalink"/>
             </guid>
             <pubDate>
                 <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, ': ')"/>
             </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: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>
                 </xsl:if>
             </xsl:if>
         </item>
index c154141..58539ae 100644 (file)
     </xsl:template>
 
     <xsl:template match="a[@data-expanded-url]" mode="enclosure">
     </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: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"/>
     </xsl:template>
 
     <xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/>
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select=".//span[contains(@class, 'js-short-timestamp')]/@data-time"/>
             </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, ': ')"/>
             </pubDate>
             <description>
                 <xsl:value-of select="concat($user-name, ': ')"/>