1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/šablona/atom.xsl Sun Apr 03 16:34:42 2011 +0200
1.3 @@ -0,0 +1,44 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<xsl:stylesheet version="2.0"
1.6 + xmlns="http://www.w3.org/2005/Atom"
1.7 + xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
1.8 + xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
1.9 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.10 + xmlns:fn="http://www.w3.org/2005/xpath-functions"
1.11 + exclude-result-prefixes="fn g j">
1.12 + <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
1.13 +
1.14 + <xsl:param name="konfigurák"></xsl:param>
1.15 +
1.16 + <xsl:template match="/">
1.17 + <!-- TODO: proměnná: -->
1.18 + <xsl:variable name="konfigurace" select="document($konfigurák)"/>
1.19 +
1.20 + <feed>
1.21 + <title><xsl:value-of select="$konfigurace/g:web/g:název"/></title>
1.22 + <subtitle><xsl:value-of select="$konfigurace/g:web/g:podtitul"/></subtitle>
1.23 + <link rel="self" href="{concat($konfigurace/g:web/g:url, 'atom.xml')}"/>
1.24 + <link href="{$konfigurace/g:web/g:url}"/>
1.25 + <updated><xsl:value-of select="current-dateTime()"/></updated>
1.26 + <author>
1.27 + <name><xsl:value-of select="$konfigurace/g:web/g:autor/g:jméno"/></name>
1.28 + <email><xsl:value-of select="$konfigurace/g:web/g:autor/g:email"/></email>
1.29 + </author>
1.30 + <id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id>
1.31 +
1.32 + <xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]">
1.33 + <entry>
1.34 + <title><xsl:value-of select="g:stránka/g:nadpis"/></title>
1.35 + <xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/>
1.36 + <link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" />
1.37 + <id><xsl:value-of select="concat('urn:', $konfigurace/g:web/g:kod ,':strana:', encode-for-uri($soubor))"/></id>
1.38 + <!--2010-10-09T20:51:04Z-->
1.39 + <updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated>
1.40 + <summary><xsl:value-of select="g:stránka/g:perex"/></summary>
1.41 + </entry>
1.42 + </xsl:for-each>
1.43 +
1.44 + </feed>
1.45 + </xsl:template>
1.46 +
1.47 +</xsl:stylesheet>