Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
a38f331c
Commit
a38f331c
authored
Dec 12, 2016
by
simei.yin
Browse files
Add comments to ant file and include build.properties
parent
f846480b
Changes
2
Hide whitespace changes
Inline
Side-by-side
hdoc_to_basex/build.properties
View file @
a38f331c
libdir
=
${basedir}/lib
rngdir
=
${basedir}/rng
xsldir
=
${basedir}/xsl
srcdir
=
${basedir}/in
outdir
=
${basedir}/out
InputPath
=
${basedir}/input
OutputPath
=
${basedir}/output
lib
=
${basedir}/lib
log
=
${basedir}/log
xsl
=
${basedir}/xsl
in
=
${basedir}/input
out
=
${basedir}/output
tmp
=
${basedir}/tmp
\ No newline at end of file
hdoc_to_basex/hdoc_to_basex.ant
View file @
a38f331c
...
...
@@ -3,49 +3,42 @@
<taskdef
resource=
"net/sf/antcontrib/antlib.xml"
/>
<property
name=
"in"
location=
"${basedir}/input"
/>
<property
name=
"out"
location=
"${basedir}/output"
/>
<property
name=
"tmp"
location=
"${basedir}/tmp"
/>
<property
name=
"xsl"
location=
"${basedir}/xsl"
/>
<property
name=
"lib"
location=
"${basedir}/lib"
/>
<property
name=
"log"
location=
"${basedir}/log"
/>
<target
name=
"convert"
>
<echo
message=
"DEBUT"
/>
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
<mkdir
dir=
"${out}"
/>
<delete
dir=
"${log}"
failonerror=
"false"
/>
<mkdir
dir=
"${log}"
/>
<for
param=
"inputFile"
>
<path>
<fileset
dir=
"${in}"
includes=
"**/*.hdoc"
/>
</path>
<sequential>
<local
name=
"filename"
/>
<basename
property=
"filename"
file=
"@{inputFile}"
/>
<antcall
target=
"UnzipHdocFile"
>
<param
name=
"filename"
value=
"${filename}"
/>
</antcall>
<antcall
target=
"content"
>
<param
name=
"filename"
value=
"${filename}"
/>
</antcall>
<echo
message=
"FIN"
/>
</sequential>
</for>
</target>
<property
file=
"build.properties"
/>
<target
name=
"convert"
>
<!-- Preparation for the file transformation : delete old folders and create new folders -->
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
<mkdir
dir=
"${out}"
/>
<delete
dir=
"${log}"
failonerror=
"false"
/>
<mkdir
dir=
"${log}"
/>
<echo
message=
"DEBUT"
/>
<!-- Convert all the hdoc files in the directory ${in} to data xml files that will be imported to basex later.
Fonctions "UnzipHdocFile" and "content" will be called. -->
<for
param=
"inputFile"
>
<path>
<fileset
dir=
"${in}"
includes=
"**/*.hdoc"
/>
</path>
<sequential>
<local
name=
"filename"
/>
<basename
property=
"filename"
file=
"@{inputFile}"
/>
<antcall
target=
"UnzipHdocFile"
>
<param
name=
"filename"
value=
"${filename}"
/>
</antcall>
<antcall
target=
"content"
>
<param
name=
"filename"
value=
"${filename}"
/>
</antcall>
<echo
message=
"FIN"
/>
</sequential>
</for>
<!-- Clean-->
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
</target>
<target
name=
"UnzipHdocFile"
>
<!-- Unzip the input hdoc file. Decompressed folder is named "decompressedHdoc" : this name is the only one which
...
...
@@ -56,15 +49,13 @@
</target>
<target
name=
"content"
>
<xslt
in=
"${tmp}/${filename}/decompressedHdoc/content.xml"
out=
"${out}/${filename}_data.xml"
style=
"${xsl}/transformation.xsl"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
<param
name=
"filename"
expression=
"${filename}"
/>
<param
name=
"lib"
expression=
"${lib}"
/>
</xslt>
<echo
message=
"${filename}"
/>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<!-- Transformation of a xml file decompressed from hdoc file to data xml file to be imported to basex.
The transformation will be done in terms of the xsl file in ${xsl}.-->
<xslt
in=
"${tmp}/${filename}/decompressedHdoc/content.xml"
out=
"${out}/${filename}_data.xml"
style=
"${xsl}/transformation.xsl"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
<param
name=
"filename"
expression=
"${filename}"
/>
<param
name=
"lib"
expression=
"${lib}"
/>
</xslt>
<echo
message=
"${filename}"
/>
</target>
</project>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment