<xsl:variable name="screen-name" select="//div[@class='profile-card-inner']/@data-screen-name"/>
- <!-- TODO: make URLs hyperlinked (http://www.dpawson.co.uk/xsl/rev2/regex2.html) -->
- <xsl:template name="tweet" match="//p[@class='js-tweet-text tweet-text']">
- <xsl:value-of select="$screen-name"/>: <xsl:value-of select=".//p[@class='js-tweet-text tweet-text']"/>
- </xsl:template>
-
<xsl:template match="//div[@id='timeline']//ol[@id='stream-items-id']//li[@data-item-type='tweet']">
+ <xsl:variable name="tweet-text" select=".//p[@class='js-tweet-text tweet-text']"/>
<item>
<title>
- <xsl:call-template name="tweet"/>
+ <xsl:value-of select="concat($screen-name, ': ')"/>
+ <xsl:value-of select="$tweet-text"/>
</title>
<link>
<xsl:value-of select="$twitterBaseURL"/><xsl:value-of select=".//a[@class='details with-icn js-details']/@href"/>
<xsl:value-of select="php:functionString('formatDate', .//small[@class='time']//span/@data-time)"/>
</pubDate>
<description>
- <xsl:call-template name="tweet"/>
+ <xsl:value-of select="concat($screen-name, ': ')"/>
+ <xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
+ <xsl:copy-of select="$tweet-text/node()"/>
+ <xsl:text disable-output-escaping="yes">]]></xsl:text>
</description>
</item>
</xsl:template>