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