When there is no screen-name, like for hashtag ans searches pages, use
the main page title as the RSS channel title.
</xsl:template>
<xsl:template match="/">
- <xsl:variable name="channel-title" select="concat('Twitter / ', $screen-name)"/>
+ <xsl:variable name="channel-title">
+ <xsl:choose>
+ <xsl:when test="$screen-name != ''">
+ <xsl:value-of select="concat('Twitter / ', $screen-name)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat('Twitter / ', normalize-space(//h1[1]))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:variable name="channel-link" select="//link[@rel='canonical']/@href"/>
<rss version="2.0">