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