šablona/rss.xsl
author František Kučera <franta-hg@frantovo.cz>
Sun, 03 Apr 2011 20:39:10 +0200
changeset 11 78a8dd1eeb2b
parent 9 71275159d985
child 18 45e41566f8a6
permissions -rw-r--r--
statický obsah a úloha pro čištění
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:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
	exclude-result-prefixes="fn g j a">
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
	
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
	<xsl:template match="/">		
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
		<rss version="2.0">
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
			<channel>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
				<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
    16
				<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
    17
				<link><xsl:value-of select="$url"/></link>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
				<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
    19
				<atom:link rel="self" href="{$url}rss.xml"/>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
				<xsl:apply-templates select="a:feed/a:entry"/>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
			</channel>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
		</rss>		
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
	</xsl:template>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
	
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
	<xsl:template match="a:entry">
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
		<item>		
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
			<title><xsl:value-of select="a:title"/></title>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
			<link><xsl:value-of select="a:link/@href"/></link>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
			<description><xsl:value-of select="a:summary"/></description>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
			<guid><xsl:value-of select="a:id"/></guid>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
			<pubDate><xsl:value-of select="format-dateTime(a:updated,
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
                '[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
    33
                'en',
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
                'ISO',
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
                'US')"/></pubDate>		
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
		</item>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
	</xsl:template>
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	
ad0ee12d13fd RSS agregace, #2
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
</xsl:stylesheet>