Changeset 7:5b46493979c9
- Timestamp:
- 04/03/11 16:51:06 (14 years ago)
- Branch:
- default
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
build.xml
r6 r7 22 22 23 23 <target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml"> 24 <!-- Atom --> 24 25 <xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl"> 25 <param name="konfigurák" expression="../vstup/web.conf"/>26 26 <classpath location="/usr/share/java/saxonb-9.0.jar"/> 27 27 <classpath location="${funkce}"/> … … 29 29 <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/> 30 30 </factory> 31 </xslt> 31 </xslt> 32 32 33 </target> 33 34 -
šablona/atom.xsl
r6 r7 9 9 <xsl:output method="xml" indent="yes" encoding="UTF-8"/> 10 10 11 <xsl:param name="konfigurák"></xsl:param> 12 13 <xsl:template match="/"> 14 <!-- TODO: proměnná: --> 15 <xsl:variable name="konfigurace" select="document($konfigurák)"/> 11 <xsl:template match="/"> 16 12 17 13 <feed> 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}"/>14 <title><xsl:value-of select="g:web/g:název"/></title> 15 <subtitle><xsl:value-of select="g:web/g:podtitul"/></subtitle> 16 <link rel="self" href="{concat(g:web/g:url, 'atom.xml')}"/> 17 <link href="{g:web/g:url}"/> 22 18 <updated><xsl:value-of select="current-dateTime()"/></updated> 23 19 <author> 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>20 <name><xsl:value-of select="g:web/g:autor/g:jméno"/></name> 21 <email><xsl:value-of select="g:web/g:autor/g:email"/></email> 26 22 </author> 27 <id><xsl:value-of select="concat('urn:uuid:', $konfigurace/g:web/g:uuid)"/></id>23 <id><xsl:value-of select="concat('urn:uuid:', g:web/g:uuid)"/></id> 28 24 25 <xsl:variable name="konfigurace" select="/"/> 29 26 <xsl:for-each select="collection('../vstup/?select=*.xml')[empty(g:stránka/g:skrytá) or not(g:stránka/g:skrytá)]"> 30 27 <entry>