Commit 1bbc0452 authored by Drain's avatar Drain

[Opale2Optim] Updated Ant file so that it can be processed without arguments

parent 77e083cb
<project name="ProjetOpale" default="convert">
<!-- Arguments properties -->
<property name="InputPath" value="source.scar" />
<property name="OutputPath" value="result.hdoc" />
<!-- Other properties -->
<property name="UnzipSourcePath" value="UnzipSourcePath" />
<property name="UnzipSourcePath" value="unzipSourcePath" />
<property name="XmlModuleName" value="" />
<property name="TmpPath" value="TmpPath" />
<property name="TmpFile1" value="TmpFile1.xml" />
<property name="TmpPath" value="tmp" />
<property name="TmpFile1" value="tmpFile1.xml" />
<property name="RacineFile" value="content.xml" />
<property name="HdocPath" value="hdoc" />
<property name="OutputPath" value="output" />
<property name="HdocPath" value="${OutputPath}/hdoc" />
<property name="ZipPath" value="${OutputPath}/result.hdoc" />
<!-- Others properties (in another file) currently empty -->
<property file="opale_to_hdoc.properties" />
......@@ -60,7 +58,12 @@
<!-- Unzip scar source file -->
<target name="unzip_scar">
<unzip src="${InputPath}" dest="./${UnzipSourcePath}"/>
<!-- get scar file path -->
<fileset id="fileset_scar" dir="input" casesensitive="yes">
<include name="*.scar"/>
</fileset>
<pathconvert property="scar.path" pathsep="" refid="fileset_scar" />
<unzip src="${scar.path}" dest="./${UnzipSourcePath}"/>
</target>
<!-- Create the hdoc structure -->
......@@ -70,8 +73,8 @@
<touch file="${HdocPath}/META-INF/container.xml" />
<touch file="${HdocPath}/mimetype" />
<echo message="application/x-hdoc+zip" file="${HdocPath}/mimetype" />
<echoxml file="${HdocPath}/META-INF/container.xml">
<container version="1.0">
<echoxml file="${HdocPath}/META-INF/container.xml" namespacePolicy="elementsOnly">
<container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0">
<rootfiles>
<rootfile full-path="${HdocPath}/${RacineFile}" media-type="text/xml" />
</rootfiles>
......@@ -89,18 +92,18 @@
<pathconvert property="xml.path" pathsep="" refid="fileset_source_xml" />
<!-- xsl -->
<xslt style="opale_to_hdoc_regle1.xsl" in="${xml.path}" out="./${TmpPath}/${TmpFile1}">
<xslt style="xsl/opale_to_hdoc_regle1.xsl" in="${xml.path}" out="./${TmpPath}/${TmpFile1}">
</xslt>
</target>
<!-- Create content.xml -->
<target name="content_xml">
<xslt style="opale_to_hdoc_regle2.xsl" in="./${TmpPath}/${TmpFile1}" out="./${HdocPath}/${RacineFile}" />
<xslt style="xsl/opale_to_hdoc_regle2.xsl" in="./${TmpPath}/${TmpFile1}" out="./${HdocPath}/${RacineFile}" />
</target>
<!-- Zip Hdoc -->
<target name="zip">
<zip destfile="${OutputPath}" basedir="${HdocPath}"/>
<zip destfile="${ZipPath}" basedir="${HdocPath}"/>
</target>
</project>
\ 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