Commit 1bbc0452 authored by Drain's avatar Drain
Browse files

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

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