forked from Edirom/WeGA-ODD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
161 lines (141 loc) · 7.29 KB
/
build.xml
File metadata and controls
161 lines (141 loc) · 7.29 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="WeGA-ODD" default="all">
<!-- import default properties from file -->
<property file="local.build.properties"/>
<property file="build.properties"/>
<condition property="lang" value="${lang}" else="de">
<isset property="lang"/>
</condition>
<target name="tei" depends="biblio,diaries,generic,letters,news,orgs,persons,places,var,writings"/>
<target name="mei" depends="works"/>
<target name="all" depends="tei,mei"/>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete>
<fileset dir="schema/en">
<include name="*.isosch"/>
</fileset>
</delete>
</target>
<target name="biblio" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_biblio.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaBiblio.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaBiblio.isosch"/>
</antcall>
</target>
<target name="diaries" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_diaries.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaDiaries.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaDiaries.isosch"/>
</antcall>
</target>
<target name="generic" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_generic.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaGeneric.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaGeneric.isosch"/>
</antcall>
</target>
<target name="letters" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_letters.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaLetters.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaLetters.isosch"/>
</antcall>
</target>
<target name="news" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_news.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaNews.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaNews.isosch"/>
</antcall>
</target>
<target name="persons" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_persons.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaPersons.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaPersons.isosch"/>
</antcall>
</target>
<target name="places" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_places.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaPlaces.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaPlaces.isosch"/>
</antcall>
</target>
<target name="var" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_var.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaVar.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaVar.isosch"/>
</antcall>
</target>
<target name="works" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_works.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaWorks.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaWorks.isosch"/>
<param name="source" value="${mei.source}"/>
</antcall>
</target>
<target name="writings" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_writings.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaWritings.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaWritings.isosch"/>
</antcall>
</target>
<target name="orgs" depends="init">
<antcall target="process">
<param name="inputFile" value="${basedir}/src/WeGA_orgs.odd.xml"/>
<param name="outputFileRNG" value="${basedir}/schema/${lang}/wegaOrgs.rng"/>
<param name="outputFileSchematron" value="${basedir}/schema/${lang}/wegaOrgs.isosch"/>
</antcall>
</target>
<target name="process">
<basename property="inputFile.basename" file="${inputFile}" suffix=".xml"/>
<!-- TEI is considered default source -->
<condition property="source" value="${source}" else="${tei.source}">
<isset property="source"/>
</condition>
<sequential>
<echo>Expanding ODD file</echo>
<xslt force="yes" style="${stylesheets.dir}/odds/odd2odd.xsl"
in="${inputFile}" out="${build.dir}/${inputFile.basename}.processed">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="lang" expression="${lang}" if="lang"/>
<param name="defaultSource" expression="${source}"/>
</xslt>
<echo>Creating RelaxNG schema</echo>
<xslt force="yes" style="${stylesheets.dir}/profiles/default/relaxng/to.xsl"
in="${build.dir}/${inputFile.basename}.processed" out="${outputFileRNG}">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="inputDir" expression="${basedir}/"/>
<!-- supply name of language-->
<param name="lang" expression="${lang}" if="lang"/>
<param name="doclang" expression="${lang}" if="lang"/>
<param name="documentationLanguage" expression="${lang}" if="lang"/>
<!-- emit some diagnostics"-->
<param name="debug" expression="${debug}" if="debug"/>
<!-- be verbose-->
<param name="verbose" expression="${verbose}" if="verbose"/>
</xslt>
<echo>Extracting Schematron rules</echo>
<xslt processor="trax" force="yes"
style="${stylesheets.dir}/profiles/default/schematron/to.xsl"
in="${build.dir}/${inputFile.basename}.processed" out="${outputFileSchematron}">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
</xslt>
</sequential>
</target>
</project>