Commit e0844396 authored by lhommeni's avatar lhommeni
Browse files

Gestion plus fine des listins, suppression de java

parent d8b5e071
*/input/ */input/
*/tmp/ */tmp/
*/output/ */output/
\ No newline at end of file */result/
\ No newline at end of file
...@@ -9,15 +9,13 @@ ...@@ -9,15 +9,13 @@
<!-- tmp paths (removed at the end of the process) --> <!-- tmp paths (removed at the end of the process) -->
<property name="tmpFolderPath" value="${basedir}/tmp"/> <property name="tmpFolderPath" value="${basedir}/tmp"/>
<property name="tmpHdocResultFolderPath" value="${tmpFolderPath}/hdoc"/> <property name="tmpHdocResultFolderPath" value="${tmpFolderPath}/hdoc"/>
<property name="in" location="${basedir}/input"/> <property name="in" value="${basedir}/input"/>
<property name="resultFolderPath" value="${basedir}/result"/> <property name="resultFolderPath" value="${basedir}/result"/>
<property name="xsltFolderPath" value="${basedir}/xslt"/> <property name="xsltFolderPath" value="${basedir}/xslt"/>
<property name="hdocResultPath" value="${resultFolderPath}/${filename}"/> <property name="hdocResultPath" value="${resultFolderPath}/${filename}"/>
<property name="inputFile" value="${hdocResultPath}/${filename}.xml"/> <!--<property name="inputFile" value="${hdocResultPath}/${filename}.xml"/>-->
<property name="inputFile" value="${in}/${filename}.xml"/>
<!-- Main target --> <!-- Main target -->
<target name="main"> <target name="main">
<antcall target="prepare"/> <antcall target="prepare"/>
...@@ -32,11 +30,15 @@ ...@@ -32,11 +30,15 @@
<mkdir dir="${tmpHdocResultFolderPath}"/> <mkdir dir="${tmpHdocResultFolderPath}"/>
<mkdir dir="${hdocResultPath}"/> <mkdir dir="${hdocResultPath}"/>
<!-- Fetching html from wikipedia --> <!-- Fetching html from wikipedia
<java fork="true" failonerror="true" jar="${basedir}/javaSources/FetchWikipediaXml.jar"> <java fork="true" failonerror="true" jar="${basedir}/javaSources/FetchWikipediaXml.jar">
<arg value="${wikipediaUrl}"/> <arg value="${wikipediaUrl}"/>
<arg value="${filename}"/> <arg value="${filename}"/>
</java> </java>-->
<loadresource encoding="UTF-8" property="myURL">
<url url="${wikipediaUrl}"/>
</loadresource>
<echo file="${inputFile}" encoding="UTF-8">${myURL}</echo>
<!-- Making tmp xml wikipedia file without some elements which are not useful --> <!-- Making tmp xml wikipedia file without some elements which are not useful -->
<xslt classpath="lib/saxon9he.jar" in="${inputFile}" out="${tmpFolderPath}/${filename}_prepared.xml" style="${xsltFolderPath}/prepare_wiki_to_hdoc.xsl"> <xslt classpath="lib/saxon9he.jar" in="${inputFile}" out="${tmpFolderPath}/${filename}_prepared.xml" style="${xsltFolderPath}/prepare_wiki_to_hdoc.xsl">
...@@ -83,6 +85,6 @@ ...@@ -83,6 +85,6 @@
<!-- Delete tmp directory --> <!-- Delete tmp directory -->
<target name="clean"> <target name="clean">
<delete dir="${tmpFolderPath}"/> <!-- <delete dir="${tmpFolderPath}"/>-->
</target> </target>
</project> </project>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<xslt <xslt
in="${toString:first}" in="${toString:first}"
out="${tmpdir}/generateContentPath.xml" out="${tmpdir}/generateContentPath.xml"
style="xsl/transformation0.xsl" style="transformation0.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/> />
<chmod file="${tmpdir}/generateContentPath.xml" perm="777"/> <chmod file="${tmpdir}/generateContentPath.xml" perm="777"/>
......
...@@ -21,25 +21,28 @@ ...@@ -21,25 +21,28 @@
<!-- This is the main target : it is called whether by the project (as the default target) or by the user/converter <!-- This is the main target : it is called whether by the project (as the default target) or by the user/converter
website, if specified in the command line. Basically, this target consists in several targets/ant buildfiles calls. --> website, if specified in the command line. Basically, this target consists in several targets/ant buildfiles calls. -->
<antcall target="CleanDirectory"/> <antcall target="CleanDirectory"/>
<mkdir dir="${tmp}"/>
<antcall target="UnzipHdocFile"/> <antcall target="UnzipHdocFile"/>
<antcall target="ValidateInput" /> <!--<antcall target="ValidateInput" />-->
<antcall target="FindContentFiles"/> <antcall target="FindContentFiles"/>
<ant antfile="${tmp}/generateContentPath.xml"/> <ant antfile="${tmp}/generateContentPath.xml"/>
<antcall target="ValidateOutput"/> <!--<antcall target="ValidateOutput"/>-->
<antcall target="DivideOutput"/> <antcall target="DivideOutput"/>
<antcall target="ZipOutput"/> <antcall target="ZipOutput"/>
<antcall target="ZipDividedOutput"/> <antcall target="ZipDividedOutput"/>
<antcall target="CleanDirectory"/> <!-- <antcall target="CleanDirectory"/>-->
</target> </target>
<target name="CleanDirectory"> <target name="CleanDirectory">
<delete dir="${tmp}"/> <delete>
<fileset dir="${tmp}">
<include name="**/*"/>
</fileset>
</delete>
</target> </target>
<target name="UnzipHdocFile"> <target name="UnzipHdocFile">
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
name="copy-references"
default="main">
<property file="global.properties"/>
<target name="main">
<mkdir dir="${tmpdir}/decompressedOpale/references"/>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml"?>
<container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0">
<rootfiles>
<rootfile full-path="content.xml" media-type="text/xml"/>
</rootfiles>
</container>
<?xml version="1.0" encoding="UTF-8"?><?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/xhtml/hdoc1-xhtml.rng" type="xml"?>
<html xmlns:functx="http://www.functx.com" xmlns="http://www.utc.fr/ics/hdoc/xhtml">
<head>
<title>Constructeur — Wikipédia</title>
<meta charset="utf-8"></meta>
<meta name="generator" content="HdocConverter/wikipedia"></meta>
<meta name="author" content="Wikipedia"></meta>
</head>
<body>
<section data-hdoc-type="introduction">
<header>
<h1>Introduction</h1>
</header>
<div>
<p>Le mot
<em>constructeur</em> peut avoir plusieurs significations :
</p>
</div>
</section>
</body>
</html>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">MaClasse obj;
...
obj = new MaClasse(5, "bonjour");</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">String[] arguments = new String[10];
// ou bien :
int[][] uneMatrice = new int[4][5];
// ou encore :
int[][] quatreLignes = new int[4][];</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">class Object
{
public :
Object (); // Constructeur par défaut
Object (int n) : nombre(n){}; // Constructeur paramétrique
Object (const Object&amp;); // Constructeur par recopie
~Object (); // Destructeur
int nombre;
};
int main ()
{
Object obj, *p_obj; // Appel du constructeur par défaut pour obj
p_obj=new Object(27); // Appel du constructeur paramétrique pour créer un objet pour p_obj
Object obj2(obj); // Appel du constructeur par recopie pour obj2
delete p_obj; // Appel du destructeur pour détruire l'objet contenu dans p_obj
} // Appel du destructeur pour obj et obj2</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">public class MaClasse
{
private int a;
private string b;
// Constructeur
public MaClasse() : this(42, "string")
{
}
// Surcharge d'un constructeur
public MaClasse(int a, string b)
{
this.a = a;
this.b = b;
}
}</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">// Instanciation d'un objet à l'aide du constructeur
MaClasse c = new MyClass(42, "string");</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">public class MaClasse
{
private static int _A;
// Constructeur statique
static MaClasse()
{
_A = 32;
}
// Constructeur standard
public MaClasse()
{
}
}</sc:code>
</op:code>
</sc:item>
\ No newline at end of file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<op:code xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<sc:code mimeType="text/plain">// Instanciation d'un objet à l'aide du constructeur
// juste avant l'instanciation
// Le constructeur statique est exécuté, _A prend la valeur 32
MaClasse c = new MaClasse();</sc:code>
</op:code>
</sc:item>
\ 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