6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
7 xmlns:fn="http://www.w3.org/2005/xpath-functions" |
7 xmlns:fn="http://www.w3.org/2005/xpath-functions" |
8 exclude-result-prefixes="fn g j"> |
8 exclude-result-prefixes="fn g j"> |
9 <xsl:output method="xml" indent="yes" encoding="UTF-8"/> |
9 <xsl:output method="xml" indent="yes" encoding="UTF-8"/> |
10 |
10 |
11 <xsl:param name="konfigurák"></xsl:param> |
11 <xsl:template match="/"> |
12 |
|
13 <xsl:template match="/"> |
|
14 <!-- TODO: proměnná: --> |
|
15 <xsl:variable name="konfigurace" select="document($konfigurák)"/> |
|
16 |
12 |
17 <feed> |
13 <feed> |
18 <title><xsl:value-of select="$konfigurace/g:web/g:název"/></title> |
14 <title><xsl:value-of select="g:web/g:název"/></title> |
19 <subtitle><xsl:value-of select="$konfigurace/g:web/g:podtitul"/></subtitle> |
15 <subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle> |
20 <link rel="self" href="{concat($konfigurace/g:web/g:url, 'atom.xml')}"/> |
16 <link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/> |
21 <link href="{$konfigurace/g:web/g:url}"/> |
17 <link href="{g:web/g:url}"/> |
22 <updated><xsl:value-of select="current-dateTime()"/></updated> |
18 <updated><xsl:value-of select="current-dateTime()"/></updated> |
23 <author> |
19 <author> |
24 <name><xsl:value-of select="$konfigurace/g:web/g:autor/g:jméno"/></name> |
20 <name><xsl:value-of select="g:web/g:autor/g:jméno"/></name> |
25 <email><xsl:value-of select="$konfigurace/g:web/g:autor/g:email"/></email> |
21 <email><xsl:value-of select="g:web/g:autor/g:email"/></email> |
26 </author> |
22 </author> |
27 <id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id> |
23 <id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id> |
28 |
24 |
|
25 <xsl:variable name="konfigurace" select="/"/> |
29 <xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]"> |
26 <xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]"> |
30 <entry> |
27 <entry> |
31 <title><xsl:value-of select="g:stránka/g:nadpis"/></title> |
28 <title><xsl:value-of select="g:stránka/g:nadpis"/></title> |
32 <xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/> |
29 <xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/> |
33 <link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" /> |
30 <link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" /> |