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

	<property file="build.properties"/>

	<property name="InputPath" value="" />
	<property name="OutputPath" value="" />
	
	<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">
		<echo>Fichier en entree : ${InputPath}</echo>
		<echo>Fichier de sortie : ${OutputPath}</echo>
		
		<unzip src="${InputPath}" dest="${srcdir}"></unzip>		
	</target>
	
	
	<target name="buildOutput" depends="unzipSource">
		<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/termToRef.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".ref">
		    <include name="**/*.term"/>
		</xslt>
		<!--<jing rngfile="${rngdir}/op_glos.rng">
			<fileset dir="${outdir}">
				<include name="**/*.ref"/>
			</fileset>
		</jing>-->
	</target>
	
	<target name="exportOutput" depends="buildOutput">
		<copy file="opale.wspmeta" tofile="${outdir}/.wspmeta"></copy>
		<zip basedir="${outdir}" destfile="${OutputPath}" encoding="UTF-8"></zip>
	</target>
		
	<target name="clean" depends="exportOutput">
		<delete dir="${srcdir}" />
		<delete dir="${outdir}" />
	</target>

</project>