<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:php="http://php.net/xsl"
xsl:extension-element-prefixes="php"
>
<xsl:output
method="xml"
encoding="iso-8859-1"
indent="yes"
/>
<xsl:template match="/">
<rss version="2.0">
<channel>
<xsl:element name="title">
<xsl:value-of select="/channel/title" />
</xsl:element>
<xsl:element name="link">
<xsl:value-of select="/channel/link" />
</xsl:element>
<xsl:element name="description">
<xsl:value-of select="/channel/description" />
</xsl:element>
<xsl:element name="language">
<xsl:value-of select="/channel/language" />
</xsl:element>
<xsl:apply-templates select="/channel/items/item"/>
<!--xsl:call-template name="items"/-->
</channel>
</rss>
</xsl:template>
<xsl:template name="items" match="/channel/items/item">
<item>
<title>
<xsl:copy-of
select="php:functionString('deviantartfeed::xsl_get_title',div/span/span/a/@title)"
/>
</title>
<link>
<xsl:value-of select="div/span/span/a/@href" />
</link>
<xsl:element name="media:thumbnail">
<xsl:attribute name="url">
<xsl:copy-of
select="php:functionString('deviantartfeed::xsl_make_local_cache',div/span/span/a/img/@src,/channel/@imageurl,/channel/@imagecache)"
/>
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="div/span/span/a/img/@width" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="div/span/span/a/img/@height" />
</xsl:attribute>
</xsl:element>
<description>
<xsl:text><p><a href="</xsl:text>
<xsl:value-of select="div/span/span/a/@href" />
<xsl:text>" title="</xsl:text>
<xsl:value-of select="div/span/span/a/@title" />
<xsl:text>"><img src="</xsl:text>
<xsl:copy-of
select="php:functionString('deviantartfeed::xsl_make_local_cache',div/span/span/a/img/@src,/channel/@imageurl,/channel/@imagecache)"
/>
<xsl:text>" width="</xsl:text>
<xsl:value-of select="div/span/span/a/img/@width" />
<xsl:text>" height="</xsl:text>
<xsl:value-of select="div/span/span/a/img/@height" />
<xsl:text>" alt="</xsl:text>
<xsl:value-of select="div/span/span/a/@title" />
<xsl:text>" /></a></p></xsl:text>
</description>
<pubDate>
<xsl:copy-of
select="php:functionString('deviantartfeed::xsl_get_date',div/span/span/a/@title)"
/>
</pubDate>
<guid isPermaLink="true"><xsl:value-of select="div/span/span/a/@href" /></guid>
</item>
</xsl:template>
</xsl:stylesheet> |