blob: f813751cd31c6b3a83005497d6401ca5a5ef63b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings"
exclude-result-prefixes="str">
<xsl:template name="mediaurl">
<mediaurl>
<title><xsl:value-of select="normalize-space(concat(/Playerdata/Behavior/Program/@program_name, ' ', /Playerdata/Behavior/Program/@episode_name))"/></title>
<xsl:choose>
<xsl:when test="starts-with(/Playerdata/Clip/SourceFile, 'rtmp://') or
starts-with(/Playerdata/Clip/SourceFile, 'rtmpe://') or
starts-with(/Playerdata/Clip/SourceFile, 'rtmpt://') or
starts-with(/Playerdata/Clip/SourceFile, 'rtmpte://') or
starts-with(/Playerdata/Clip/SourceFile, 'rtmps://')">
<url priority="50">wvt:///bin/ruutu-dl?contenttype=video/x-flv&arg=<xsl:value-of select="str:encode-uri(/Playerdata/Clip/SourceFile, true())"/>&arg=http://www.ruutu.fi/video</url>
</xsl:when>
<xsl:otherwise>
<url priority="50"><xsl:value-of select="/Playerdata/Clip/SourceFile"/></url>
</xsl:otherwise>
</xsl:choose>
</mediaurl>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="mediaurl"/>
</xsl:template>
</xsl:stylesheet>
|