diff options
Diffstat (limited to 'templates/www.metacafe.com/navigation.xsl')
-rw-r--r-- | templates/www.metacafe.com/navigation.xsl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/www.metacafe.com/navigation.xsl b/templates/www.metacafe.com/navigation.xsl new file mode 100644 index 0000000..a4cb8e0 --- /dev/null +++ b/templates/www.metacafe.com/navigation.xsl @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<xsl:stylesheet version="1.0" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<xsl:template match="item"> + <link> + <label><xsl:value-of select="title" /></label> + <xsl:choose> + <xsl:when test="starts-with(id, 'yt-')"> + <stream>wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?video_id=<xsl:value-of select="substring(id, 4)"/></stream> + </xsl:when> + <xsl:otherwise> + <stream>wvt:///www.metacafe.com/videopage.xsl?srcurl=<xsl:value-of select="link"/></stream> + </xsl:otherwise> + </xsl:choose> + + <ref>wvt:///www.metacafe.com/description.xsl?srcurl=/api/item/<xsl:value-of select="id"/></ref> + </link> +</xsl:template> + +<xsl:template match="/"> +<wvmenu> + <title><xsl:value-of select="/rss/channel/title"/></title> + + <xsl:apply-templates select="/rss/channel/item"/> + + <xsl:if test="count(/rss/channel/item) = 0"> + <textarea> + <label>No matching results.</label> + </textarea> + </xsl:if> +</wvmenu> +</xsl:template> + +</xsl:stylesheet> |