š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í
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:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
franta-hg@8
     6
	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
franta-hg@8
     7
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@8
     8
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@8
     9
	exclude-result-prefixes="fn g j a">
franta-hg@8
    10
	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
franta-hg@8
    11
	
franta-hg@8
    12
	<xsl:template match="/">		
franta-hg@8
    13
		<rss version="2.0">
franta-hg@8
    14
			<channel>
franta-hg@8
    15
				<xsl:variable name="url" select="a:feed/a:link[not(@rel)]/@href"/>
franta-hg@8
    16
				<title><xsl:value-of select="a:feed/a:title"/></title>
franta-hg@8
    17
				<link><xsl:value-of select="$url"/></link>
franta-hg@8
    18
				<description><xsl:value-of select="a:feed/a:subtitle"/></description>				
franta-hg@8
    19
				<atom:link rel="self" href="{$url}rss.xml"/>
franta-hg@8
    20
				<xsl:apply-templates select="a:feed/a:entry"/>
franta-hg@8
    21
			</channel>
franta-hg@8
    22
		</rss>		
franta-hg@8
    23
	</xsl:template>
franta-hg@8
    24
	
franta-hg@8
    25
	<xsl:template match="a:entry">
franta-hg@8
    26
		<item>		
franta-hg@8
    27
			<title><xsl:value-of select="a:title"/></title>
franta-hg@8
    28
			<link><xsl:value-of select="a:link/@href"/></link>
franta-hg@8
    29
			<description><xsl:value-of select="a:summary"/></description>
franta-hg@8
    30
			<guid><xsl:value-of select="a:id"/></guid>
franta-hg@8
    31
			<pubDate><xsl:value-of select="format-dateTime(a:updated,
franta-hg@8
    32
                '[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z]',
franta-hg@8
    33
                'en',
franta-hg@8
    34
                'ISO',
franta-hg@8
    35
                'US')"/></pubDate>		
franta-hg@8
    36
		</item>
franta-hg@8
    37
	</xsl:template>
franta-hg@8
    38
	
franta-hg@8
    39
</xsl:stylesheet>