šablona/rss.xsl
author František Kučera <franta-hg@frantovo.cz>
Wed, 06 Jul 2011 23:14:15 +0200
changeset 25 0d84061c9878
parent 18 45e41566f8a6
child 61 9503eb8377f1
permissions -rw-r--r--
Seznam všech stránek formou odstavců.
franta-hg@8
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@8
     2
<xsl:stylesheet version="2.0"
franta-hg@8
     3
	xmlns:a="http://www.w3.org/2005/Atom"
franta-hg@9
     4
	xmlns:atom="http://www.w3.org/2005/Atom"
franta-hg@8
     5
	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
franta-hg@8
     6
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@8
     7
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@18
     8
	exclude-result-prefixes="fn j a">
franta-hg@8
     9
	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
franta-hg@8
    10
	
franta-hg@8
    11
	<xsl:template match="/">		
franta-hg@8
    12
		<rss version="2.0">
franta-hg@8
    13
			<channel>
franta-hg@8
    14
				<xsl:variable name="url" select="a:feed/a:link[not(@rel)]/@href"/>
franta-hg@8
    15
				<title><xsl:value-of select="a:feed/a:title"/></title>
franta-hg@8
    16
				<link><xsl:value-of select="$url"/></link>
franta-hg@8
    17
				<description><xsl:value-of select="a:feed/a:subtitle"/></description>				
franta-hg@8
    18
				<atom:link rel="self" href="{$url}rss.xml"/>
franta-hg@8
    19
				<xsl:apply-templates select="a:feed/a:entry"/>
franta-hg@8
    20
			</channel>
franta-hg@8
    21
		</rss>		
franta-hg@8
    22
	</xsl:template>
franta-hg@8
    23
	
franta-hg@8
    24
	<xsl:template match="a:entry">
franta-hg@8
    25
		<item>		
franta-hg@8
    26
			<title><xsl:value-of select="a:title"/></title>
franta-hg@8
    27
			<link><xsl:value-of select="a:link/@href"/></link>
franta-hg@8
    28
			<description><xsl:value-of select="a:summary"/></description>
franta-hg@8
    29
			<guid><xsl:value-of select="a:id"/></guid>
franta-hg@8
    30
			<pubDate><xsl:value-of select="format-dateTime(a:updated,
franta-hg@8
    31
                '[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z]',
franta-hg@8
    32
                'en',
franta-hg@8
    33
                'ISO',
franta-hg@8
    34
                'US')"/></pubDate>		
franta-hg@8
    35
		</item>
franta-hg@8
    36
	</xsl:template>
franta-hg@8
    37
	
franta-hg@8
    38
</xsl:stylesheet>