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
e0844396
Commit
e0844396
authored
Dec 14, 2015
by
lhommeni
Browse files
Gestion plus fine des listins, suppression de java
parent
d8b5e071
Changes
48
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
e0844396
*/input/
*/tmp/
*/output/
\ No newline at end of file
*/output/
*/result/
\ No newline at end of file
wikipedia_to_hdoc/ant/wiki_to_hdoc_fetcher.ant
View file @
e0844396
...
...
@@ -9,15 +9,13 @@
<!-- tmp paths (removed at the end of the process) -->
<property
name=
"tmpFolderPath"
value=
"${basedir}/tmp"
/>
<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=
"xsltFolderPath"
value=
"${basedir}/xslt"
/>
<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 -->
<target
name=
"main"
>
<antcall
target=
"prepare"
/>
...
...
@@ -32,11 +30,15 @@
<mkdir
dir=
"${tmpHdocResultFolderPath}"
/>
<mkdir
dir=
"${hdocResultPath}"
/>
<!-- Fetching html from wikipedia
-->
<!-- Fetching html from wikipedia
<java fork="true" failonerror="true" jar="${basedir}/javaSources/FetchWikipediaXml.jar">
<arg value="${wikipediaUrl}"/>
<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 -->
<xslt
classpath=
"lib/saxon9he.jar"
in=
"${inputFile}"
out=
"${tmpFolderPath}/${filename}_prepared.xml"
style=
"${xsltFolderPath}/prepare_wiki_to_hdoc.xsl"
>
...
...
@@ -83,6 +85,6 @@
<!-- Delete tmp directory -->
<target
name=
"clean"
>
<delete
dir=
"${tmpFolderPath}"
/>
<!--
<delete dir="${tmpFolderPath}"/>
-->
</target>
</project>
wikipedia_to_hdoc/hdoc_to_opale/hdoc_to_opale.ant
View file @
e0844396
...
...
@@ -51,7 +51,7 @@
<xslt
in=
"${toString:first}"
out=
"${tmpdir}/generateContentPath.xml"
style=
"
xsl/
transformation0.xsl"
style=
"transformation0.xsl"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<chmod
file=
"${tmpdir}/generateContentPath.xml"
perm=
"777"
/>
...
...
wikipedia_to_hdoc/hdoc_to_opale/myantce.ant
View file @
e0844396
...
...
@@ -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
website, if specified in the command line. Basically, this target consists in several targets/ant buildfiles calls. -->
<antcall
target=
"CleanDirectory"
/>
<mkdir
dir=
"${tmp}"
/>
<antcall
target=
"UnzipHdocFile"
/>
<antcall
target=
"ValidateInput"
/>
<!--
<antcall target="ValidateInput" />
-->
<antcall
target=
"FindContentFiles"
/>
<ant
antfile=
"${tmp}/generateContentPath.xml"
/>
<antcall
target=
"ValidateOutput"
/>
<!--
<antcall target="ValidateOutput"/>
-->
<antcall
target=
"DivideOutput"
/>
<antcall
target=
"ZipOutput"
/>
<antcall
target=
"ZipDividedOutput"
/>
<antcall
target=
"CleanDirectory"
/>
<!--
<antcall target="CleanDirectory"/>
-->
</target>
<target
name=
"CleanDirectory"
>
<delete
dir=
"${tmp}"
/>
<delete>
<fileset
dir=
"${tmp}"
>
<include
name=
"**/*"
/>
</fileset>
</delete>
</target>
<target
name=
"UnzipHdocFile"
>
...
...
wikipedia_to_hdoc/hdoc_to_opale/output/outdividedOutput.scar
View file @
e0844396
No preview for this file type
wikipedia_to_hdoc/hdoc_to_opale/output/output.scar
View file @
e0844396
No preview for this file type
wikipedia_to_hdoc/hdoc_to_opale/tmp/convertReferences.xml
0 → 100644
View file @
e0844396
<?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>
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/META-INF/container.xml
0 → 100644
View file @
e0844396
<?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>
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/__MACOSX/._META-INF
0 → 100644
View file @
e0844396
File added
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/__MACOSX/._content.xml
0 → 100644
View file @
e0844396
File added
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/__MACOSX/._mimetype
0 → 100644
View file @
e0844396
File added
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/__MACOSX/META-INF/._container.xml
0 → 100644
View file @
e0844396
File added
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/content.xml
0 → 100644
View file @
e0844396
<?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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing1.xml
0 → 100644
View file @
e0844396
<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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing2.xml
0 → 100644
View file @
e0844396
<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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing3.xml
0 → 100644
View file @
e0844396
<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
&
); // 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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing4.xml
0 → 100644
View file @
e0844396
<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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing5.xml
0 → 100644
View file @
e0844396
<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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing6.xml
0 → 100644
View file @
e0844396
<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
wikipedia_to_hdoc/hdoc_to_opale/tmp/decompressedHdoc/listing/listing7.xml
0 → 100644
View file @
e0844396
<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
Prev
1
2
3
Next
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