| 1 | <project name="xhtml-web" basedir="." default="generuj"> |
|---|
| 2 | |
|---|
| 3 | <!-- Používané adresáře – např. zde můžete vstup a výstup nasměrovat do jiného verzovaného úložiště --> |
|---|
| 4 | <property name="vstup" value="vstup"/> |
|---|
| 5 | <property name="výstup" value="výstup"/> |
|---|
| 6 | <property name="šablona" value="šablona"/> |
|---|
| 7 | <property name="temp" value="temp"/> |
|---|
| 8 | <property name="funkce" value="${šablona}/funkce/build/classes"/> |
|---|
| 9 | |
|---|
| 10 | <target name="generuj" description="Vygeneruje kompletní web." depends="kompiluj-funkce,stránky,agregace"> |
|---|
| 11 | </target> |
|---|
| 12 | |
|---|
| 13 | <target name="stránky" description="Vygeneruje XHTML webové stránky."> |
|---|
| 14 | <xslt basedir="${vstup}" destdir="${výstup}" includes="*.xml" extension=".xhtml" style="${šablona}/stránka.xsl"> |
|---|
| 15 | <classpath location="/usr/share/java/saxonb-9.0.jar"/> |
|---|
| 16 | <classpath location="${funkce}"/> |
|---|
| 17 | <factory name="net.sf.saxon.TransformerFactoryImpl"> |
|---|
| 18 | <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/> |
|---|
| 19 | </factory> |
|---|
| 20 | </xslt> |
|---|
| 21 | </target> |
|---|
| 22 | |
|---|
| 23 | <target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml"> |
|---|
| 24 | <!-- TODO: sloučit, zjednodušit, parametrizovat --> |
|---|
| 25 | |
|---|
| 26 | <!-- Atom --> |
|---|
| 27 | <xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl"> |
|---|
| 28 | <classpath location="/usr/share/java/saxonb-9.0.jar"/> |
|---|
| 29 | <classpath location="${funkce}"/> |
|---|
| 30 | <factory name="net.sf.saxon.TransformerFactoryImpl"> |
|---|
| 31 | <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/> |
|---|
| 32 | </factory> |
|---|
| 33 | </xslt> |
|---|
| 34 | |
|---|
| 35 | <!-- RSS --> |
|---|
| 36 | <xslt in="${výstup}/atom.xml" out="${výstup}/rss.xml" style="${šablona}/rss.xsl"> |
|---|
| 37 | <classpath location="/usr/share/java/saxonb-9.0.jar"/> |
|---|
| 38 | <classpath location="${funkce}"/> |
|---|
| 39 | <factory name="net.sf.saxon.TransformerFactoryImpl"> |
|---|
| 40 | <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/> |
|---|
| 41 | </factory> |
|---|
| 42 | </xslt> |
|---|
| 43 | |
|---|
| 44 | <!-- TODO: Sitemap.xml --> |
|---|
| 45 | <xslt in="${výstup}/atom.xml" out="${výstup}/sitemap.xml" style="${šablona}/sitemap.xsl"> |
|---|
| 46 | <classpath location="/usr/share/java/saxonb-9.0.jar"/> |
|---|
| 47 | <classpath location="${funkce}"/> |
|---|
| 48 | <factory name="net.sf.saxon.TransformerFactoryImpl"> |
|---|
| 49 | <attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/> |
|---|
| 50 | </factory> |
|---|
| 51 | </xslt> |
|---|
| 52 | |
|---|
| 53 | </target> |
|---|
| 54 | |
|---|
| 55 | <target name="kompiluj-funkce" description=""> |
|---|
| 56 | <mkdir dir="${funkce}"/> |
|---|
| 57 | <javac |
|---|
| 58 | srcdir="${šablona}/funkce/src" |
|---|
| 59 | destdir="${funkce}" |
|---|
| 60 | includeAntRuntime="no"> |
|---|
| 61 | </javac> |
|---|
| 62 | </target> |
|---|
| 63 | |
|---|
| 64 | </project> |
|---|