summaryrefslogtreecommitdiff
path: root/tv.nrk.no.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'tv.nrk.no.xsl')
-rw-r--r--tv.nrk.no.xsl5
1 files changed, 4 insertions, 1 deletions
diff --git a/tv.nrk.no.xsl b/tv.nrk.no.xsl
index 736228a..4d46f05 100644
--- a/tv.nrk.no.xsl
+++ b/tv.nrk.no.xsl
@@ -18,13 +18,16 @@
<xsl:template name="li">
<entry>
<xsl:variable name='href' select='a/@href'/>
+ <!--
<xsl:variable name='filename' select='concat("tmp/", strings:encode-uri(normalize-space(a), true()), ".xml")'/>
+ -->
+ <xsl:variable name='filename' select='strings:replace(substring-after(normalize-space(@href), "http://tv.nrk.no/"), "/", "_")'/>
<xsl:variable name='show' select='document($filename)'/>
<id><xsl:value-of select="$href"/></id>
<title><xsl:value-of select='normalize-space(a)'/></title>
<updated><xsl:value-of select="a/strong/time/@datetime"/></updated>
<author><name>Trygve Laugstøl</name></author>
- <link><xsl:attribute name="href"><xsl:value-of select="a/@href"/></xsl:attribute></link>
+ <link><xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute></link>
<content type="xhtml" xml:lang="en">
<div xmlns="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="$show/html:html//html:section[@id='information']/*"/>