diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-06 23:47:12 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-06 23:47:12 +0200 |
commit | b0ffb988ac64d19c437cbcd40f7af9a580c8cb2e (patch) | |
tree | eaca529776acb7e479892b5e3eb72be29e9dec1b /tv.nrk.no.xsl | |
parent | 98d5dcad7e774b40a47b0b4e7552ad0d4b1ac309 (diff) | |
download | tv.nrk.no-to-atom-b0ffb988ac64d19c437cbcd40f7af9a580c8cb2e.tar.gz tv.nrk.no-to-atom-b0ffb988ac64d19c437cbcd40f7af9a580c8cb2e.tar.bz2 tv.nrk.no-to-atom-b0ffb988ac64d19c437cbcd40f7af9a580c8cb2e.tar.xz tv.nrk.no-to-atom-b0ffb988ac64d19c437cbcd40f7af9a580c8cb2e.zip |
o Better encoding of local filename.
Diffstat (limited to 'tv.nrk.no.xsl')
-rw-r--r-- | tv.nrk.no.xsl | 5 |
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']/*"/> |