diff options
Diffstat (limited to 'tv.nrk.no.xsl')
-rw-r--r-- | tv.nrk.no.xsl | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tv.nrk.no.xsl b/tv.nrk.no.xsl index a825181..b4c53d5 100644 --- a/tv.nrk.no.xsl +++ b/tv.nrk.no.xsl @@ -1,6 +1,8 @@ <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:strings="http://exslt.org/strings" + xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/2005/Atom"> <xsl:output indent="yes"/> <xsl:template match="/html"> @@ -8,16 +10,38 @@ <title>Recently Sent from NRK</title> <id>urn:trygvis:2012,07,tv.nrk.no,recently-sent</id> <xsl:for-each select="//li"> -<xsl:call-template name="li"/> + <xsl:call-template name="li"/> </xsl:for-each> </feed> </xsl:template> <xsl:template name="li"> <entry> - <id><xsl:value-of select="a/@href"/></id> + <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='show' select='document($filename)'/> + <!-- + <xsl:variable name='href' select='"heli-hogst.html"'/> + --> + <id><xsl:value-of select="$href"/></id> <!-- <id>urn:trygvis:2012,07,tv.nrk.no,item,<xsl:value-of select='normalize-space(a)'/></id> --> + <!-- + /html/body/div/div/div/div/section/article/div/div/section[@id='information'] + --> + <!-- + href: <xsl:value-of select="$href"/> + filename: <xsl:value-of select="$filename"/> + --> + <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']/*"/> + </div> + </content> + <!-- + --> + + <!-- <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> @@ -27,6 +51,7 @@ <summary> <xsl:value-of select="normalize-space(div[@class='stack-links'])"/> </summary> + --> </entry> </xsl:template> </xsl:stylesheet> |