šablona/atom.xsl
author František Kučera <franta-hg@frantovo.cz>
Sun Apr 03 16:51:06 2011 +0200 (2011-04-03)
changeset 7 5b46493979c9
parent 6 801a8935caf7
child 15 cfb2fc0ca242
permissions -rw-r--r--
Atom – zjednodušení, #2
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@6
     4
	xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor"
franta-hg@6
     5
	xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce"
franta-hg@6
     6
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
franta-hg@6
     7
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
franta-hg@6
     8
	exclude-result-prefixes="fn g j">
franta-hg@6
     9
	<xsl:output	method="xml" indent="yes" encoding="UTF-8"/>
franta-hg@6
    10
	
franta-hg@7
    11
	<xsl:template match="/">		
franta-hg@6
    12
	
franta-hg@6
    13
		<feed>
franta-hg@7
    14
			<title><xsl:value-of select="g:web/g:název"/></title>
franta-hg@7
    15
			<subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle>
franta-hg@7
    16
			<link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/>
franta-hg@7
    17
			<link href="{g:web/g:url}"/>			
franta-hg@6
    18
			<updated><xsl:value-of select="current-dateTime()"/></updated>			
franta-hg@6
    19
			<author>
franta-hg@7
    20
				<name><xsl:value-of select="g:web/g:autor/g:jméno"/></name>
franta-hg@7
    21
				<email><xsl:value-of select="g:web/g:autor/g:email"/></email>
franta-hg@6
    22
			</author>
franta-hg@7
    23
			<id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id>
franta-hg@6
    24
			
franta-hg@7
    25
			<xsl:variable name="konfigurace" select="/"/>
franta-hg@6
    26
			<xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]">
franta-hg@6
    27
				<entry>
franta-hg@6
    28
					<title><xsl:value-of select="g:stránka/g:nadpis"/></title>
franta-hg@6
    29
					<xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/>
franta-hg@6
    30
					<link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" />
franta-hg@6
    31
					<id><xsl:value-of select="concat('urn:', $konfigurace/g:web/g:kod ,':strana:', encode-for-uri($soubor))"/></id>
franta-hg@6
    32
					<!--2010-10-09T20:51:04Z-->
franta-hg@6
    33
					<updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated>
franta-hg@6
    34
					<summary><xsl:value-of select="g:stránka/g:perex"/></summary>
franta-hg@6
    35
				</entry>
franta-hg@6
    36
			</xsl:for-each>
franta-hg@6
    37
			
franta-hg@6
    38
		</feed>
franta-hg@6
    39
	</xsl:template>
franta-hg@6
    40
	
franta-hg@6
    41
</xsl:stylesheet>