[6] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xsl:stylesheet version="2.0" |
---|
| 3 | xmlns="http://www.w3.org/2005/Atom" |
---|
| 4 | xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor" |
---|
| 5 | xmlns:j="java:cz.frantovo.xmlWebGenerator.Funkce" |
---|
| 6 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
| 7 | xmlns:fn="http://www.w3.org/2005/xpath-functions" |
---|
| 8 | exclude-result-prefixes="fn g j"> |
---|
| 9 | <xsl:output method="xml" indent="yes" encoding="UTF-8"/> |
---|
| 10 | |
---|
[15] | 11 | <xsl:param name="vstupníPřípona" select="'.xml'"/> |
---|
| 12 | <xsl:param name="výstupníPřípona" select="'.xhtml'"/> |
---|
| 13 | |
---|
[7] | 14 | <xsl:template match="/"> |
---|
[6] | 15 | |
---|
| 16 | <feed> |
---|
[7] | 17 | <title><xsl:value-of select="g:web/g:název"/></title> |
---|
| 18 | <subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle> |
---|
| 19 | <link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/> |
---|
| 20 | <link href="{g:web/g:url}"/> |
---|
[6] | 21 | <updated><xsl:value-of select="current-dateTime()"/></updated> |
---|
| 22 | <author> |
---|
[7] | 23 | <name><xsl:value-of select="g:web/g:autor/g:jméno"/></name> |
---|
| 24 | <email><xsl:value-of select="g:web/g:autor/g:email"/></email> |
---|
[6] | 25 | </author> |
---|
[7] | 26 | <id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id> |
---|
[6] | 27 | |
---|
[7] | 28 | <xsl:variable name="konfigurace" select="/"/> |
---|
[15] | 29 | <xsl:for-each select="collection(concat('../vstup/?select=*', $vstupníPřípona))[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]"> |
---|
[6] | 30 | <entry> |
---|
| 31 | <title><xsl:value-of select="g:stránka/g:nadpis"/></title> |
---|
[15] | 32 | <xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], $vstupníPřípona, '')"/> |
---|
| 33 | <link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), $výstupníPřípona)}" /> |
---|
[6] | 34 | <id><xsl:value-of select="concat('urn:', $konfigurace/g:web/g:kod ,':strana:', encode-for-uri($soubor))"/></id> |
---|
| 35 | <!--2010-10-09T20:51:04Z--> |
---|
| 36 | <updated><xsl:value-of select="j:posledníZměna(document-uri(.))"/></updated> |
---|
| 37 | <summary><xsl:value-of select="g:stránka/g:perex"/></summary> |
---|
| 38 | </entry> |
---|
| 39 | </xsl:for-each> |
---|
| 40 | |
---|
| 41 | </feed> |
---|
| 42 | </xsl:template> |
---|
| 43 | |
---|
| 44 | </xsl:stylesheet> |
---|