šablona/atom.xsl
changeset 7 5b46493979c9
parent 6 801a8935caf7
child 15 cfb2fc0ca242
--- a/šablona/atom.xsl	Sun Apr 03 16:34:42 2011 +0200
+++ b/šablona/atom.xsl	Sun Apr 03 16:51:06 2011 +0200
@@ -8,24 +8,21 @@
 	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)"/>
+	<xsl:template match="/">		
 	
 		<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}"/>			
+			<title><xsl:value-of select="g:web/g:název"/></title>
+			<subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle>
+			<link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/>
+			<link href="{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>
+				<name><xsl:value-of select="g:web/g:autor/g:jméno"/></name>
+				<email><xsl:value-of select="g:web/g:autor/g:email"/></email>
 			</author>
-			<id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id>
+			<id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id>
 			
+			<xsl:variable name="konfigurace" select="/"/>
 			<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>