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