diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-06 23:17:37 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-06 23:17:37 +0200 |
commit | ee59534aac4b07a54cf56fc0b2383c3b27185128 (patch) | |
tree | d11f748c9ec2404671014a665cf2f88f91ac6a4d /tv.nrk.no.xsl | |
parent | c5986e3bc647752052780ac277294c83b1fd5e9d (diff) | |
download | tv.nrk.no-to-atom-ee59534aac4b07a54cf56fc0b2383c3b27185128.tar.gz tv.nrk.no-to-atom-ee59534aac4b07a54cf56fc0b2383c3b27185128.tar.bz2 tv.nrk.no-to-atom-ee59534aac4b07a54cf56fc0b2383c3b27185128.tar.xz tv.nrk.no-to-atom-ee59534aac4b07a54cf56fc0b2383c3b27185128.zip |
o Trying to include more stuff.
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> |