Commit 93d733a9 authored by Jean Vintache's avatar Jean Vintache

ant build processes only one file, which must be located in the input folder and named pad.html

parent 02bb24fa
in = ${basedir}/input
out = ${basedir}/output
tmp = ${basedir}/tmp
xsl = ${basedir}/xsl
lib = ${basedir}/lib
log = ${basedir}/log
rootfilename = content.xml
\ No newline at end of file
......@@ -2,46 +2,50 @@
<project basedir="." name="myantce" default="main">
<property file=""/>
<target name="start">
<delete dir="${tmp}" failonerror="false"/>
<mkdir dir="${tmp}"/>
<delete dir="${out}" failonerror="false"/>
<mkdir dir="${out}"/>
<delete dir="${log}" failonerror="false"/>
<mkdir dir="${log}"/>
<target name="clean-tmp">
<delete dir="${tmp}" failonerror="false"/>
<mkdir dir="${tmp}"/>
<!-- Apply Xslt -->
<target name="tranformation">
<xslt in="${xsl}/etherpad2hdoc.xsl" out="${out}/etherpad.xml" style="${xsl}/etherpad2hdoc.xsl"/>
<target name="apply-xslt">
<xslt in="${in}/pad.html" out="${tmp}/tmpPad.xhtml" style="${xsl}/html2xhtml.xsl" />
<xslt in="${tmp}/tmpPad.html" out="${tmp}/content.xml" style="${xsl}/xhtml2hdoc.xsl" />
<!-- Builds Hdoc structure -->
<target name="construct_hdoc">
<delete dir="${emplacement_hdoc}" failonerror="false"/>
<mkdir dir="${emplacement_hdoc}" />
<mkdir dir="${emplacement_hdoc}/META-INF" />
<touch file="${emplacement_hdoc}/META-INF/container.xml" />
<touch file="${emplacement_hdoc}/mimetype" />
<echo message="application/x-hdoc+zip" file="${emplacement_hdoc}/mimetype" />
<mkdir dir="${tmp}/META-INF" />
<!-- Fill Hdoc container -->
<target name="fill_container" depends="construct_hdoc">
<echoxml file="${emplacement_hdoc}/META-INF/container.xml">
<!-- container -->
<touch file="${tmp}/META-INF/container.xml" />
<echoxml file="${tmp}/META-INF/container.xml">
<container version="1.0">
<rootfile full-path="${rootfile}" media-type="text/xml" />
<rootfile full-path="${rootfilename}" media-type="text/xml" />
<!-- mimetype -->
<touch file="${tmp}/mimetype" />
<echo message="application/x-hdoc+zip" file="${tmp}/mimetype" />
<!-- Zip Hdoc container -->
<target name="zip">
<zip basedir="${emplacement_hdoc}" destfile="outputHdoc.hdoc" />
<zip basedir="${tmp}" destfile="${out}/output.hdoc" />
<target name="main" depends="tranformation,fill_container,zip">
<target name="main" depends="start,apply-xslt,construct_hdoc,zip" />
\ No newline at end of file
......@@ -4,4 +4,12 @@
<xsl:output method="xml" indent="yes" />
<!-- identity -->
<xsl:template match="@*|node()">
<xsl:apply-templates select="@*|node()"/>
\ 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