hdoc_to_lexique.ant 1.68 KB
Newer Older
Antoine's avatar
Antoine committed
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="clean" basedir=".">

	<property file="build.properties"/>

	
	<!-- <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
		<classpath>
			<pathelement location="${libdir}/jing.jar"/>
		</classpath>
	</taskdef> -->

	<target name="init">
		<mkdir dir="${outdir}"/>
		<chmod perm="777" dir="${outdir}"></chmod>
		<mkdir dir="${srcdir}"/>
		<chmod perm="777" dir="${srcdir}"></chmod>
	</target>
	
	<target name="unzipSource" depends="init">
		<fileset dir="${InputPath}" id="inputsId">
			<include name="*.zip"/>
			<include name="*.scar"/>
		</fileset>      
		<property name="nameInputsId" refid="inputsId"/>
		
		<echo>Fichier en entree : ${nameInputsId}</echo>
		<unzip src="${InputPath}/${nameInputsId}" dest="${srcdir}/${nameInputsId}"></unzip>
	</target>
	
	
	<target name="buildOutput" depends="unzipSource">
		<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/hdoc_to_lexique.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".term">
		    <include name="**/*.xml"/>
		</xslt>
		<!--<jing rngfile="${rngdir}/op_glos.rng">
			<fileset dir="${outdir}">
				<include name="**/*.ref"/>
			</fileset>
		</jing>-->
	</target>

	
	<target name="exportOutput" depends="buildOutput">
		<copy file="lexique.wspmeta" tofile="${outdir}/.wspmeta"></copy>
		<copydir src="${outdir}/${nameInputsId}" dest="${OutputPath}/lexique-${nameInputsId}"></copydir>
		<!--<zip basedir="${outdir}" destfile="${OutputPath}/opale-${nameInputsId}" encoding="UTF-8"></zip>-->
	</target>
		
	<target name="clean" depends="exportOutput">
		<delete dir="${srcdir}" />
		<delete dir="${outdir}" />
	</target>

</project>