Commit 13d565d4 authored by Baptiste Montange's avatar Baptiste Montange

update ant xsl for several files

parent 96953e57
...@@ -13,16 +13,18 @@ ...@@ -13,16 +13,18 @@
<target name="convert"> <target name="convert">
<echo message="DEBUT"/> <echo message="DEBUT"/>
<delete dir="${tmp}" failonerror="false"/>
<sleep seconds="1"/>
<mkdir dir="${tmp}"/> <mkdir dir="${tmp}"/>
<delete dir="${out}" failonerror="false"/> <delete dir="${out}" failonerror="false"/>
<sleep seconds="1"/>
<mkdir dir="${out}"/> <mkdir dir="${out}"/>
<delete dir="${log}" failonerror="false"/> <delete dir="${log}" failonerror="false"/>
<sleep seconds="1"/>
<mkdir dir="${log}"/> <mkdir dir="${log}"/>
<for param="inputFile">
<path> <path>
<fileset dir="${in}" includes="**/*.hdoc"/> <fileset dir="${in}" includes="**/*.hdoc"/>
</path> </path>
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
<sequential> <sequential>
<local name="filename"/> <local name="filename"/>
<basename property="filename" file="sample.hdoc"/> <basename property="filename" file="@{inputFile}"/>
<antcall target="UnzipHdocFile"> <antcall target="UnzipHdocFile">
<param name="filename" value="${filename}"/> <param name="filename" value="${filename}"/>
...@@ -39,9 +41,10 @@ ...@@ -39,9 +41,10 @@
<antcall target="content"> <antcall target="content">
<param name="filename" value="${filename}"/> <param name="filename" value="${filename}"/>
</antcall> </antcall>
</sequential>
<echo message="FIN"/> <echo message="FIN"/>
</sequential>
</for>
</target> </target>
<target name="UnzipHdocFile"> <target name="UnzipHdocFile">
...@@ -50,14 +53,17 @@ ...@@ -50,14 +53,17 @@
<unzip src="${in}/${filename}" dest="${tmp}/${filename}/decompressedHdoc"/> <unzip src="${in}/${filename}" dest="${tmp}/${filename}/decompressedHdoc"/>
<chmod dir="${tmp}/${filename}/decompressedHdoc" perm="777"/> <chmod dir="${tmp}/${filename}/decompressedHdoc" perm="777"/>
<echo message="${tmp}/${filename}/decompressedHdoc"/> <echo message="${tmp}/${filename}/decompressedHdoc"/>
<sleep seconds="1"/>
</target> </target>
<target name="content" > <target name="content" >
<xslt in="${tmp}/${filename}/decompressedHdoc/content.xml" out="${tmp}/${filename}/generateContentPath.xml" style="${xsl}/transformation.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"> <xslt in="${tmp}/${filename}/decompressedHdoc/content.xml" out="${out}/${filename}/${filename}_data.xml" style="${xsl}/transformation.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
<param name="filename" expression="${filename}"/> <param name="filename" expression="${filename}"/>
<param name="lib" expression="${lib}"/> <param name="lib" expression="${lib}"/>
</xslt> </xslt>
<echo message="${filename}" />
<delete dir="${tmp}" failonerror="false"/>
</target> </target>
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<titre><xsl:value-of select="./h:title"/></titre> <titre><xsl:value-of select="./h:title"/></titre>
</xsl:template> </xsl:template>
<xsl:template match="h:body" mode="title"> <xsl:template match="h:body"></xsl:template>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment