Index: analýza/princip.dot
===================================================================
--- analýza/princip.dot	(revision 1:a05c6f3cbc3e)
+++ analýza/princip.dot	(revision 6:801a8935caf7)
@@ -2,10 +2,19 @@
     rankdir=LR
 
-    gen		[label="Generátor" shape="box" labelURL="xxxxxxxx"]
+    gen		[label="Generátor\n(Ant: build.xml)" shape="box"]
     xml		[label="Texty v XML"]
     xhtml	[label="XHTML web"]
-    xslt	[label="XSLT šablona"]
+    xslt	[label="XSLT šablony"]
 
-    xml -> gen -> xhtml;
+    atom	[label="Atom"]
+    rss		[label="RSS"]
+    sitemap	[label="sitemap.xml"]
+
+    xml -> gen;
     xslt -> gen;
+
+    gen -> xhtml;
+    gen -> atom;
+    gen -> rss;
+    gen -> sitemap;
 }
Index: build.xml
===================================================================
--- build.xml	(revision 4:1bb39595a51c)
+++ build.xml	(revision 6:801a8935caf7)
@@ -8,18 +8,36 @@
 	<property name="funkce" value="${šablona}/funkce/build/classes"/>
 	
-	<target name="generuj" description="Vygeneruje XHTML webové stránky.">		
+	<target	name="generuj" description="Vygeneruje kompletní web." depends="kompiluj-funkce,stránky,agregace">
+	</target>
+	
+	<target name="stránky" description="Vygeneruje XHTML webové stránky.">		
 		<xslt basedir="${vstup}" destdir="${výstup}" includes="*.xml" extension=".xhtml" style="${šablona}/stránka.xsl">
 			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
-            <classpath location="${funkce}"/>
-			
-            <factory name="net.sf.saxon.TransformerFactoryImpl">
+			<classpath location="${funkce}"/>
+			<factory name="net.sf.saxon.TransformerFactoryImpl">
 				<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>				
 			</factory>
-			
-			<sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
-			<sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
-			<sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>			
 		</xslt>
 	</target>
 	
+	<target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml">
+		<xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl">
+			<param name="konfigurák" expression="../vstup/web.conf"/>
+			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
+			<classpath location="${funkce}"/>			
+			<factory name="net.sf.saxon.TransformerFactoryImpl">
+				<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>				
+			</factory>
+		</xslt>	
+	</target>
+	
+	<target name="kompiluj-funkce" description="">		
+		<mkdir dir="${funkce}"/>
+		<javac
+			srcdir="${šablona}/funkce/src"
+			destdir="${funkce}"			
+			includeAntRuntime="no">
+		</javac>
+	</target>
+	
 </project>
Index: vstup/web.conf
===================================================================
--- vstup/web.conf	(revision 6:801a8935caf7)
+++ vstup/web.conf	(revision 6:801a8935caf7)
@@ -0,0 +1,12 @@
+<web xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor">
+	<název>Chovatelská stanice tučňáků</název>
+	<podtitul>vše pro tučňáky</podtitul>
+	<autor>
+		<jméno>František Kučera</jméno>
+		<email>nereknu_nechci_spam@example.com</email>
+	</autor>
+	<url>https://trac.frantovo.cz/xml-web-generator/</url>
+	<uuid>399a714c-956e-444c-a8f4-afe8f0df802a</uuid>
+	<kod>PokusnyWeb123</kod>
+	
+</web>
Index: šablona/atom.xsl
===================================================================
--- šablona/atom.xsl	(revision 6:801a8935caf7)
+++ šablona/atom.xsl	(revision 6:801a8935caf7)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"
+	xmlns="http://www.w3.org/2005/Atom"
+	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
+	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:fn="http://www.w3.org/2005/xpath-functions"
+	exclude-result-prefixes="fn g j">
+	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
+	
+	<xsl:param name="konfigurák"></xsl:param>
+	
+	<xsl:template match="/">
+		<!-- TODO: proměnná: -->
+		<xsl:variable name="konfigurace" select="document($konfigurák)"/>
+	
+		<feed>
+			<title><xsl:value-of select="$konfigurace/g:web/g:název"/></title>
+			<subtitle><xsl:value-of select="$konfigurace/g:web/g:podtitul"/></subtitle>
+			<link rel="self" href="{concat($konfigurace/g:web/g:url, 'atom.xml')}"/>
+			<link href="{$konfigurace/g:web/g:url}"/>			
+			<updated><xsl:value-of select="current-dateTime()"/></updated>			
+			<author>
+				<name><xsl:value-of select="$konfigurace/g:web/g:autor/g:jméno"/></name>
+				<email><xsl:value-of select="$konfigurace/g:web/g:autor/g:email"/></email>
+			</author>
+			<id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id>
+			
+			<xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]">
+				<entry>
+					<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
+					<xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/>
+					<link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" />
+					<id><xsl:value-of select="concat('urn:', $konfigurace/g:web/g:kod ,':strana:', encode-for-uri($soubor))"/></id>
+					<!--2010-10-09T20:51:04Z-->
+					<updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated>
+					<summary><xsl:value-of select="g:stránka/g:perex"/></summary>
+				</entry>
+			</xsl:for-each>
+			
+		</feed>
+	</xsl:template>
+	
+</xsl:stylesheet>
Index: šablona/funkce/src/cz/frantovo/xmlWebGenerator/Funkce.java
===================================================================
--- šablona/funkce/src/cz/frantovo/xmlWebGenerator/Funkce.java	(revision 6:801a8935caf7)
+++ šablona/funkce/src/cz/frantovo/xmlWebGenerator/Funkce.java	(revision 6:801a8935caf7)
@@ -0,0 +1,13 @@
+package cz.frantovo.xmlWebGenerator;
+
+import java.io.File;
+import java.util.Date;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class Funkce {
+        public static Date posledníZměna(String soubor) throws URISyntaxException {
+                return new Date(new File(new URI(soubor)).lastModified());
+        }
+}
+
Index: šablona/stránka.xsl
===================================================================
--- šablona/stránka.xsl	(revision 5:0a7c6c9357d3)
+++ šablona/stránka.xsl	(revision 6:801a8935caf7)
@@ -19,5 +19,7 @@
 		<html>
 			<head>
-				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>				
+				<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
+				<link title="Novinky (Atom)" href="atom.xml" type="application/atom+xml" rel="alternate" />
+				<link title="Novinky (RSS)" href="rss.xml" type="application/atom+xml" rel="alternate" />				
 			</head>
 			<body>
