franta-hg@6
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
franta-hg@6
|
2 |
<xsl:stylesheet version="2.0"
|
franta-hg@6
|
3 |
xmlns="http://www.w3.org/2005/Atom"
|
franta-hg@18
|
4 |
xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
|
franta-hg@18
|
5 |
xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
|
franta-hg@6
|
6 |
xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
|
franta-hg@6
|
7 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
franta-hg@6
|
8 |
xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
franta-hg@18
|
9 |
exclude-result-prefixes="fn s k j">
|
franta-hg@6
|
10 |
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
|
franta-hg@6
|
11 |
|
franta-hg@15
|
12 |
<xsl:param name="vstupníPřípona" select="'.xml'"/>
|
franta-hg@15
|
13 |
<xsl:param name="výstupníPřípona" select="'.xhtml'"/>
|
franta-hg@15
|
14 |
|
franta-hg@21
|
15 |
<xsl:template match="/">
|
franta-hg@6
|
16 |
|
franta-hg@6
|
17 |
<feed>
|
franta-hg@18
|
18 |
<title><xsl:value-of select="k:web/k:název"/></title>
|
franta-hg@18
|
19 |
<subtitle><xsl:value-of select="k:web/k:podtitul"/></subtitle>
|
franta-hg@18
|
20 |
<link rel="self" href="{concat(k:web/k:url, 'atom.xml')}"/>
|
franta-hg@18
|
21 |
<link href="{k:web/k:url}"/>
|
franta-hg@6
|
22 |
<updated><xsl:value-of select="current-dateTime()"/></updated>
|
franta-hg@6
|
23 |
<author>
|
franta-hg@18
|
24 |
<name><xsl:value-of select="k:web/k:autor/k:jméno"/></name>
|
franta-hg@18
|
25 |
<email><xsl:value-of select="k:web/k:autor/k:email"/></email>
|
franta-hg@6
|
26 |
</author>
|
franta-hg@18
|
27 |
<id><xsl:value-of select="concat('urn:uuid:', k:web/k:uuid)"/></id>
|
franta-hg@6
|
28 |
|
franta-hg@7
|
29 |
<xsl:variable name="konfigurace" select="/"/>
|
franta-hg@18
|
30 |
<xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[empty(s:stránka/s:skrytá) or not(s:stránka/s:skrytá)]">
|
franta-hg@6
|
31 |
<entry>
|
franta-hg@18
|
32 |
<title><xsl:value-of select="s:stránka/s:nadpis"/></title>
|
franta-hg@15
|
33 |
<xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], $vstupníPřípona, '')"/>
|
franta-hg@18
|
34 |
<link href="{concat($konfigurace/k:web/k:url, encode-for-uri($soubor), $výstupníPřípona)}" />
|
franta-hg@18
|
35 |
<id><xsl:value-of select="concat('urn:', $konfigurace/k:web/k:kod ,':strana:', encode-for-uri($soubor))"/></id>
|
franta-hg@6
|
36 |
<updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated>
|
franta-hg@18
|
37 |
<summary><xsl:value-of select="s:stránka/s:perex"/></summary>
|
franta-hg@6
|
38 |
</entry>
|
franta-hg@6
|
39 |
</xsl:for-each>
|
franta-hg@6
|
40 |
|
franta-hg@6
|
41 |
</feed>
|
franta-hg@6
|
42 |
</xsl:template>
|
franta-hg@6
|
43 |
|
franta-hg@6
|
44 |
</xsl:stylesheet>
|