X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/cfa97246db710911554532b4a6f88f6b5e5cb6b0..6e513d255b204e746d194a0b1d1590751f31a9d0:/rss_converter_facebook.com.xsl?ds=sidebyside diff --git a/rss_converter_facebook.com.xsl b/rss_converter_facebook.com.xsl index 9fbc187..418b3d2 100644 --- a/rss_converter_facebook.com.xsl +++ b/rss_converter_facebook.com.xsl @@ -42,12 +42,28 @@ https://facebook.com + + + - - + + + + + + - <xsl:variable name="item-title" select="$item-content/p"/> + <xsl:variable name="item-title" select="$item-content//p"/> <xsl:variable name="title-length" select="140"/> <!-- ellipsize, inspired from http://stackoverflow.com/questions/13622338 --> <xsl:choose> @@ -69,12 +85,20 @@ </guid> <pubDate> <xsl:variable name="timestamp" select=".//abbr[@data-shorten]/@data-utime"/> - <xsl:value-of select="php:functionString('Tweeper::epoch_to_gmdate', number($timestamp))"/> + <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', $timestamp)"/> </pubDate> <description> + + <!-- + Get only the children starting from the one with class="userContent", + this way the content header is skipped + --> + <xsl:variable + name="usercontent-position" + select="count($item-content/div[contains(@class, 'userContent')]/preceding-sibling::*) + 1"/> + <xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text> - <xsl:copy-of select="$item-content/node()"/> - <xsl:copy-of select=".//div[@class='mtm']/node()"/> + <xsl:copy-of select="$item-content/div[position() >= $usercontent-position]"/> <xsl:text disable-output-escaping="yes">]]></xsl:text> </description> </item>