Java funkce pro zjištění poslední úpravy souboru, Atom agregace, konfigurační soubor webu.
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"/>
11 <xsl:param name="konfigurák"></xsl:param>
13 <xsl:template match="/">
14 <!-- TODO: proměnná: -->
15 <xsl:variable name="konfigurace" select="document($konfigurák)"/>
18 <title><xsl:value-of select="$konfigurace/g:web/g:název"/></title>
19 <subtitle><xsl:value-of select="$konfigurace/g:web/g:podtitul"/></subtitle>
20 <link rel="self" href="{concat($konfigurace/g:web/g:url, 'atom.xml')}"/>
21 <link href="{$konfigurace/g:web/g:url}"/>
22 <updated><xsl:value-of select="current-dateTime()"/></updated>
24 <name><xsl:value-of select="$konfigurace/g:web/g:autor/g:jméno"/></name>
25 <email><xsl:value-of select="$konfigurace/g:web/g:autor/g:email"/></email>
27 <id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id>
29 <xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]">
31 <title><xsl:value-of select="g:stránka/g:nadpis"/></title>
32 <xsl:variable name="soubor" select="replace(tokenize(document-uri(.), '/')[last()], '.xml', '')"/>
33 <link href="{concat($konfigurace/g:web/g:url, encode-for-uri($soubor), '.xhtml')}" />
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>