Technical documentation
Preamble
This subsection will explain precisely how the conversion process works. If you are reading this, I assume you are be familiar with XML technologies seen in NF29 (i.e. ANT scripts, XSL-XSLT transformations and Hdoc format). I also recommend you to open my source files and read my comments.
Besides, my converter have been tested on recent ANT versions (> 1.7.0) only. It doesn't need any plugins (such as ANT-contrib, Java, Perl...) to work .
How does the converter works
This converter is using standard NF29 conversion project structure : I use a main ANT file (named mapMapping2Hdoc.ant), which handles routine tasks (zipping archives, copying files, order tasks), XSL-XSLT transformation scripts calls. This main ANT file is composed of several targets.
Temporary files
During the conversion process, I use a few temporary files stored in a temp folder : their content depends on hdoc's files (such as "container.xml", "content.xml" and ressource files). See details below.
What does my main ANT file do ?
In that order :
it load the Freemind file passed in parameter
To convert the file closer to the original, different XSL-XSLT transformation are done. So the user can choose the hdoc file corresponding to his needs.
These transformations are :
META-INF folder and container.xml are created
The files are compressed, and named as its conversation type.
it cleans every temporary files and folders created during the conversion process.
There are also <chmod> tasks : they are not necessary if you are running the converter on your computer, yet they are useful for the website.
What is META-INF folder ?
This is a simple folder with a xml file named 'content.xml' that contains useful information for Opale. Every .scar archives must contain this file, what it exactly does is not the purpose of this project.
Freemind / Hdoc equivalence
This is a brief list a what markups are supported, and how they are converted. Like there is only one markup in freemind file (tag node), the conversation is based on the hierarchy.
There are more informations in my comments in each XSLT file.
Fremind | Hdoc |
last child node | div |
second last child node | section<unit-of-content> |
third last child node | section |