Techical documentation

This converter works using ANT/XSL/JAVA technologies.

convert.xml :

This file is the main ANT file, this script will be called in order to start the conversion, this one need 3 parameters :

  • filename : name of the input file

  • out : name of the output file

  • dir : name of the directory containing the map

  1. Firstly every directory are created

  2. A .Jar file (no_doctype.jar)is called in order to delete every Doctypes from the different files

  3. Call a XSL file (read_map.xsl) to concatenate every files (map and topics) in one file

  4. Call a XSL file (copy_images.xsl) to create an other ANT file to copy the images

  5. Run the new ANT (ant_image.xml) to copy the images

  6. Call a XSL file (read_concept_task.xsl) to treat all the map and topics and convert it into Hdoc

  7. Create a .zip with the result

  8. Delete useless files

  9. Run the Hdoctoopale script in order to create a .scar file

no_doctype.jar

This .Jar takes a String for parameter this one is the name of the treated directory. The JAVA application search every file into the directory and delete each lines containing a doctype : "< !Doctype...>"

read_map.xsl

This XSL file search every <topicref> tags and replace them by the actual content of theses topics (concept or task) and create a new XML file "concat.xml" with all the content.

copy_images.xsl

This XSL read the concat.xml file and search every images in order to create a new ant file (ant_image.xml), the important part of this XSL is to read well the path which at the same time the actual image path but also contains the directory containing the topic path.

ant_image.xml

This is a simple ant file with a list of <copy> instructions used to copy every images in a new folder called "src".

read_concept_task.xsl

This is the most important XSL file containing all the parsing instructions :

  • Get the map information and create the first section

  • Get the topics information and create sub-sections of the first one

  • Treat every tags contained by the topics