-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
83 lines (67 loc) · 3.7 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="calendar" name="LiturgyCalendar">
<!-- Note:
- Saxon PE of EE license is required. Saxon HE won't work!!
This is because <xsl:try> is used for the file caching mechanism.
- File caching is using the 'cache' folder, which may require manual cleaning !!
-->
<property name="saxon-pe.location.ant" value="C:\Program Files\Saxon\saxon9pe.jar"/>
<dirname property="LiturgyCalendar.basedir" file="${ant.file.LiturgyCalendar}"/>
<!--property name="years" value="2013,2014,2015,2016"/-->
<property name="years" value="2013"/>
<!--property name="langs" value="en,nl,fr"/-->
<property name="langs" value="en,nl"/>
<target name="calendar" depends="calendar.of,calendar.eo"></target>
<target name="i18n-calendar" depends="i18n-calendar.of,i18n-calendar.eo"></target>
<target name="calendar.clean" depends="calendar.of.clean,calendar.eo.clean"></target>
<target name="calendar.of">
<xslt style="${LiturgyCalendar.basedir}/calendar-by-year.xsl"
in="${LiturgyCalendar.basedir}/custom-ruleset-of.parametrized.xml"
out="${LiturgyCalendar.basedir}/output/calendar-of-${years}.xml">
<!-- the input file isn't actually used, but the same file must be provided as 'ruleset' parameter
for ANT to detect changes, it's also used as input file, but a dummy.xml would work as well -->
<param name="years" expression="${years}"/>
<param name="ruleset" expression="custom-ruleset-of.parametrized.xml"/>
<classpath location="${saxon-pe.location.ant}" />
</xslt>
</target>
<target name="i18n-calendar.of" depends="calendar.of">
<xslt style="${LiturgyCalendar.basedir}/i18n-calendar.xsl"
in="${LiturgyCalendar.basedir}/output/calendar-of-${years}.xml"
out="${LiturgyCalendar.basedir}/output/i18n-calendar-of-${years}-${langs}.xml">
<param name="langslist" expression="${langs}"/>
<classpath location="${saxon-pe.location.ant}" />
</xslt>
</target>
<target name="calendar.eo">
<xslt style="${LiturgyCalendar.basedir}/calendar-by-year.xsl"
in="${LiturgyCalendar.basedir}/custom-ruleset-eo.parametrized.xml"
out="${LiturgyCalendar.basedir}/output/calendar-eo-${years}.xml">
<!-- the input file isn't actually used, but the same file must be provided as 'ruleset' parameter
for ANT to detect changes, it's also used as input file, but a dummy.xml would work as well -->
<param name="years" expression="${years}"/>
<param name="ruleset" expression="custom-ruleset-eo.parametrized.xml"/>
<classpath location="${saxon-pe.location.ant}" />
</xslt>
</target>
<target name="i18n-calendar.eo" depends="calendar.eo">
<xslt style="${LiturgyCalendar.basedir}/i18n-calendar.xsl"
in="${LiturgyCalendar.basedir}/output/calendar-eo-${years}.xml"
out="${LiturgyCalendar.basedir}/output/i18n-calendar-eo-${years}-${langs}.xml">
<param name="langslist" expression="${langs}"/>
<classpath location="${saxon-pe.location.ant}" />
</xslt>
</target>
<target name="calendar.of.clean">
<delete file="${LiturgyCalendar.basedir}/output/calendar-of-${years}.xml"/>
<delete file="${LiturgyCalendar.basedir}/output/i18n-calendar-of-${years}-${langs}.xml"/>
<delete file="${LiturgyCalendar.basedir}/cache/custom-ruleset-of.parametrized.xml-file.xml"/>
<echo message="You may need to remove files from cache"/>
</target>
<target name="calendar.eo.clean">
<delete file="${LiturgyCalendar.basedir}/output/calendar-eo-${years}.xml"/>
<delete file="${LiturgyCalendar.basedir}/output/i18n-calendar-eo-${years}-${langs}.xml"/>
<delete file="${LiturgyCalendar.basedir}/cache/custom-ruleset-eo.parametrized.xml-file.xml"/>
<echo message="You may need to remove files from cache"/>
</target>
</project>