Warning, /multimedia/kmplayer/data/blip-api.xsl is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="ISO-8859-1"?>
0002
0003 <xsl:stylesheet version="1.0"
0004 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0005 xmlns:str="http://exslt.org/strings">
0006
0007 <xsl:template match="/">
0008 <playlist>
0009 <xsl:for-each select="response/payload/asset">
0010 <xsl:variable name="item_title">
0011 <xsl:value-of select="normalize-space(title)"/>
0012 </xsl:variable>
0013 <group title="{$item_title}">
0014 <item title="{$item_title}">
0015 <smil>
0016 <head>
0017 <layout>
0018 <root-layout width="400" height="300" background-color="#F5F5DC"/>
0019 <region id="title" left="10" top="10" height="18" right="10"/>
0020 <region id="notice" left="180" top="40" bottom="190" right="10" background-color="#101023"/>
0021 <region id="desc" left="10" top="120" bottom="10" right="10" fit="scroll"/>
0022 </layout>
0023 </head>
0024 <body>
0025 <par dur="indefinite">
0026 <smilText region="title" textFontWeight="bold" textColor="#101023" textFontSize="11" textAlign="center">
0027 <xsl:value-of select="$item_title"/>
0028 </smilText>
0029 <smilText region="notice" textColor="#F5F5DC">
0030 <p textFontWeight="bold" textAlign="center" textFontSize="10">
0031 Notice for links to Blip TV
0032 </p>
0033 <div textFontSize="9" textFontStyle="italic" textAlign="right">
0034 These links are best viewed when saved first.
0035 </div>
0036 </smilText>
0037 <xsl:variable name="text">
0038 <xsl:value-of select="description"/>
0039 </xsl:variable>
0040 <xsl:variable name="text64">
0041 <xsl:value-of select="str:encode-uri($text,true())"/>
0042 </xsl:variable>
0043 <text region="desc" src="data:text/html,{$text64}" fontPtSize="11" mediaBackgroundOpacity="0" fontFace="serif"/>
0044 </par>
0045 </body>
0046 </smil>
0047 </item>
0048 <xsl:apply-templates select="mediaList"/>
0049 </group>
0050 </xsl:for-each>
0051 </playlist>
0052 </xsl:template>
0053
0054 <xsl:template match="node()">
0055 </xsl:template>
0056
0057 <xsl:template match="mediaList">
0058 <xsl:apply-templates select="media"/>
0059 </xsl:template>
0060
0061 <xsl:template match="media">
0062 <xsl:variable name="bytes">
0063 <xsl:value-of select="size"/>
0064 </xsl:variable>
0065 <xsl:variable name="size_txt">
0066 <xsl:choose>
0067 <xsl:when test="number($bytes) > 1048576">
0068 <xsl:value-of select="concat(' (',round($bytes div 1048576),' Mb)')"/>
0069 </xsl:when>
0070 <xsl:otherwise>
0071 <xsl:value-of select="concat(' (',round($bytes div 1024), ' kb)')"/>
0072 </xsl:otherwise>
0073 </xsl:choose>
0074 </xsl:variable>
0075 <xsl:apply-templates select="link">
0076 <xsl:with-param name="filesize">
0077 <xsl:value-of select="$size_txt"/>
0078 </xsl:with-param>
0079 </xsl:apply-templates>
0080 </xsl:template>
0081
0082 <xsl:template match="link">
0083 <xsl:param name="filesize"/>
0084 <xsl:variable name="item_type">
0085 <xsl:choose>
0086 <xsl:when test="@type">
0087 <xsl:value-of select="normalize-space(@type)"/>
0088 </xsl:when>
0089 <xsl:otherwise>
0090 <xsl:value-of select="@href"/>
0091 </xsl:otherwise>
0092 </xsl:choose>
0093 </xsl:variable>
0094 <xsl:variable name="item_title">
0095 <xsl:value-of select="concat($item_type,$filesize)"/>
0096 </xsl:variable>
0097 <item title="{$item_title}" url="{@href}"/>
0098 </xsl:template>
0099
0100 </xsl:stylesheet>