debian/copyright: update contact info and copyright years
[tweeper.git] / rss_converter_pump.io.xsl
index ef4b6e8..94b083b 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   Stylesheet to convert Pump.io activity streams to RSS.
 
 <!--
   Stylesheet to convert Pump.io activity streams to RSS.
 
-  Copyright (C) 2013  Antonio Ospite <ospite@studenti.unina.it>
+  Copyright (C) 2013-2014  Antonio Ospite <ao2@ao2.it>
 
   This file is part of tweeper.
 
 
   This file is part of tweeper.
 
@@ -26,6 +26,9 @@
 
     <xsl:output method="xml" indent="yes"/>
 
 
     <xsl:output method="xml" indent="yes"/>
 
+    <xsl:variable name="domain-name" select="substring-after(//div[@id='profile-block']/@data-profile-id, '@')"/>
+    <xsl:variable name="BaseURL" select="concat('https://', $domain-name)"/>
+
     <xsl:variable name="user-name" select="substring-after(//div[@id='profile-block']/@data-profile-id, ':')"/>
 
     <xsl:template match="//div[@id='user-content-activities']//ul[@id='major-stream']/li">
     <xsl:variable name="user-name" select="substring-after(//div[@id='profile-block']/@data-profile-id, ':')"/>
 
     <xsl:template match="//div[@id='user-content-activities']//ul[@id='major-stream']/li">
@@ -38,7 +41,7 @@
                 <xsl:value-of select=".//p[@class='muted']/small/a/@href"/>
             </link>
             <pubDate>
                 <xsl:value-of select=".//p[@class='muted']/small/a/@href"/>
             </link>
             <pubDate>
-                <xsl:value-of select="php:functionString('str_to_gmdate', .//abbr[@class='easydate']/@title)"/>
+                <xsl:value-of select="php:functionString('Tweeper::str_to_gmdate', .//abbr[@class='easydate']/@title)"/>
             </pubDate>
             <description>
                 <xsl:value-of select="concat($user-name, ': ')"/>
             </pubDate>
             <description>
                 <xsl:value-of select="concat($user-name, ': ')"/>
@@ -52,6 +55,7 @@
     <xsl:template match="/">
 
         <rss version="2.0">
     <xsl:template match="/">
 
         <rss version="2.0">
+            <xsl:attribute name="xml:base"><xsl:value-of select="$BaseURL" /></xsl:attribute>
             <channel>
                 <generator>Tweeper</generator>
                 <title>
             <channel>
                 <generator>Tweeper</generator>
                 <title>