summaryrefslogtreecommitdiff
path: root/templates/www.metacafe.com/categories.xsl
blob: d140939fbe7605235253c15891ee6139236a2bd0 (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
32
33
<?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="/">
<wvmenu>
  <title>Metacafe</title>

  <link>
    <label>Search</label>
    <ref>wvt:///www.metacafe.com/search.xsl</ref>
  </link>

  <link>
    <label>Most viewed channels</label>
    <ref>wvt:///www.metacafe.com/channellist.xsl?srcurl=/api/channels/</ref>
  </link>

  <xsl:for-each select="id('LeftCol')/ul/li/a">
    <!-- '18+ Only' is empty unless family filter is off. Ignore the
         category until I find a way to turn off the filter. -->
    <xsl:if test="@title != '18+ Only'">
      <link>
	<label><xsl:value-of select="@title"/></label>
	<ref>wvt:///www.metacafe.com/navigation.xsl?srcurl=/api/videos/-/<xsl:value-of select="substring-after(@href, '/videos/')"/></ref>
      </link>
    </xsl:if>
  </xsl:for-each>
</wvmenu>
</xsl:template>

</xsl:stylesheet>