Twitpic
Transforms Twitpic links into images.
Description
A simple utility that transforms Twitpic links into real images.
XSLT
View Raw
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" exclude-result-prefixes="exsl str"> <xsl:template name="twitpic"> <xsl:param name="tweet"/> <xsl:if test="contains(tweet, 'http://twitpic.com/')"> <xsl:param name="after" select="substring-after($tweet, 'http://twitpic.com/')"/> <xsl:param name="tokens" select="str:split($after, ' ')"/> <xsl:param name="uuid" select="exsl:node-set($tokens)/text()"/> <xsl:if test="$tokens"> <div class="embed twitpic"> <img src="http://twitpic.com/show/full/{$uuid}"/> </div> </xsl:if> </xsl:if> </xsl:template> </xsl:stylesheet>