Index: tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 2981)
+++ tmp/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 2982)
@@ -467,15 +467,15 @@
 	// }
 	
 	public boolean export(File exportzip) {
-		return export(exportzip, null, null);
+		return export(exportzip, null, null, null);
 	}
 	
-	public boolean export(File exportzip, IProgressMonitor monitor, HashSet<String> ignore) {
+	public boolean export(File exportzip, IProgressMonitor monitor, HashSet<String> ignore, String version) {
 		if (this.getProject() != null) {
 			try {
 				this.getProject().saveParameters(true); // write parameters in preferences
 				this.getProject().persist(true); // save preferences
-				return this.getProject().export(exportzip, monitor, ignore);
+				return this.getProject().export(exportzip, monitor, ignore, version);
 			}
 			catch (Exception e) {
 				// TODO Auto-generated catch block
Index: tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java	(revision 2981)
+++ tmp/org.txm.core/src/java/org/txm/objects/BaseOldParameters.java	(revision 2982)
@@ -25,53 +25,72 @@
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
-public class BaseOldParameters implements IParameters  {
-
+public class BaseOldParameters implements IParameters {
+	
 	public static final DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
+	
 	public static final DateFormat shortUKDateformat = new SimpleDateFormat("dd-MM-yy"); //$NON-NLS-1$
-
-	HashMap<String, Object> keyValueParameters = new HashMap<String, Object>();
-
+	
+	HashMap<String, Object> keyValueParameters = new HashMap<>();
+	
 	public static final String ANNOTATE = "annotate"; //$NON-NLS-1$
+	
 	public static final String CORPUS = "corpus"; //$NON-NLS-1$
+	
 	public static final String CURRENTVERSION = "0.8.0"; //$NON-NLS-1$
+	
 	public static final String DATE = "date"; //$NON-NLS-1$
+	
 	public static final String DEFAULT = "default"; //$NON-NLS-1$
+	
 	public static final String DESC = "desc"; //$NON-NLS-1$
+	
 	public static final String ENCODING = "encoding"; //$NON-NLS-1$
+	
 	public static final String LANG = "lang"; //$NON-NLS-1$
+	
 	public static final String LINK = "link"; //$NON-NLS-1$
+	
 	public static final String NAME = "name"; //$NON-NLS-1$
+	
 	public static final String PARAM = "param"; //$NON-NLS-1$
+	
 	public static final String QUERY = "query"; //$NON-NLS-1$
+	
 	public static final String TARGET = "target"; //$NON-NLS-1$
+	
 	public static final String TYPE = "BASE"; //$NON-NLS-1$
+	
 	public static final String PARAMETERS = "parameters"; //$NON-NLS-1$
+	
 	public static final String PARAMETERKEY = "key"; //$NON-NLS-1$
+	
 	public static final String PARAMETERVALUE = "value"; //$NON-NLS-1$
-
+	
 	public static final String TRUE = "true"; //$NON-NLS-1$
+	
 	public static final String FALSE = "false"; //$NON-NLS-1$
-
+	
 	public static String VALUE = "value"; //$NON-NLS-1$
-	public static void createEmptyParams(File paramFile, String basename) throws IOException
-	{
+	
+	public static void createEmptyParams(File paramFile, String basename) throws IOException {
 		paramFile.getParentFile().mkdirs();
 		FileOutputStream fwriter = new FileOutputStream(paramFile);
 		BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fwriter, "UTF-8")); //$NON-NLS-1$
-
+		
 		String AUTHOR = System.getProperty("user.name"); //$NON-NLS-1$
 		String DATE = dateformat.format(new Date());
 		DATE = DATE.replace("/", "-"); //$NON-NLS-1$ //$NON-NLS-2$
-
-		String description = "&lt;pre&gt;&lt;br/&gt;"+"- "+basename+"&lt;br/&gt;- "+AUTHOR+"&lt;br/&gt;- "+DATE+"&lt;/pre&gt;"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		
+		String description = "&lt;pre&gt;&lt;br/&gt;" + "- " + basename + "&lt;br/&gt;- " + AUTHOR + "&lt;br/&gt;- " + DATE + "&lt;/pre&gt;"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 		String path = paramFile.getParentFile().getAbsolutePath();
 		path = path.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll("\"", "&#34;"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
 		writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
-		writer.write("<import version=\""+CURRENTVERSION+"\" author=\""+AUTHOR+"\" date=\""+DATE+"\" desc=\"\" name=\""+basename+"\" rootDir=\""+path+"\" script=\"\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		writer.write("<import version=\"" + CURRENTVERSION + "\" author=\"" + AUTHOR + "\" date=\"" + DATE + "\" desc=\"\" name=\"" + basename + "\" rootDir=\"" + path + "\" script=\"\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
 		writer.write(" <linkGrp type=\"align\"></linkGrp>\n"); //$NON-NLS-1$
 		writer.write(" <corpora>\n"); //$NON-NLS-1$
-		writer.write("    <corpus desc=\""+description+"\" cqpid=\"\" encoding=\""+System.getProperty("file.encoding")+"\" lang=\""+Locale.getDefault().getLanguage()+"\" font=\"\" annotate=\"true\" name=\""+basename.toUpperCase()+"\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		writer.write("    <corpus desc=\"" + description + "\" cqpid=\"\" encoding=\"" + System.getProperty("file.encoding") + "\" lang=\"" + Locale.getDefault().getLanguage() //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				+ "\" font=\"\" annotate=\"true\" name=\"" + basename.toUpperCase() + "\">\n");  //$NON-NLS-1$ //$NON-NLS-2$
 		writer.write("       <tokenizer onlyThoseTests=\"false\"></tokenizer>\n"); //$NON-NLS-1$
 		writer.write("       <xslt xsl=\"\"></xslt>\n"); //$NON-NLS-1$
 		writer.write("       <pattributes></pattributes>\n"); //$NON-NLS-1$
@@ -89,7 +108,7 @@
 		writer.write("    </corpus>\n"); //$NON-NLS-1$
 		writer.write(" </corpora>\n"); //$NON-NLS-1$
 		writer.write("</import>\n"); //$NON-NLS-1$
-
+		
 		writer.close();
 	}
 	
@@ -98,66 +117,73 @@
 		return root.getDocumentElement().getAttribute("name"); //$NON-NLS-1$
 	}
 	
-	public static void main(String args[]) throws ParserConfigurationException, SAXException, IOException
-	{
+	public static void main(String args[]) throws ParserConfigurationException, SAXException, IOException {
 		String home = System.getProperty("user.home"); //$NON-NLS-1$
 		File paramFile = new File(home, "TXM/corpora/xmltxmpara/param.xml"); //$NON-NLS-1$
 		BaseOldParameters p = new BaseOldParameters(paramFile);
 		p.load();
 		System.out.println(p.toString());
 	}
-
+	
 	public HashMap<String, Element> getCorpora() {
 		return corpora;
 	}
-
+	
 	public String author;
+	
 	String AVOIDXMLSTEPSDEFAULT = FALSE;
+	
 	String CLEANTEMPDIRSDEFAULT = TRUE;
-	public HashMap<String, Element> corpora = new HashMap<String, Element>();
+	
+	public HashMap<String, Element> corpora = new HashMap<>();
+	
 	public Element corporaElement;
+	
 	public Date date;
+	
 	String DEFAULT_CQPLIMITS = "text"; //$NON-NLS-1$
+	
 	boolean DEFAULT_DOEDITION = true;
+	
 	String DEFAULT_PAGEELEMENT = "pb"; //$NON-NLS-1$
-
+	
 	int DEFAULT_WORDSPERPAGE = 500;
+	
 	public String description;
-
+	
 	String DOEDITIONSTEPSDEFAULT = TRUE;
-	public HashMap<String, Element> links = new HashMap<String, Element>();
-
+	
+	public HashMap<String, Element> links = new HashMap<>();
+	
 	public String name;
-
+	
 	public File paramFile;
-
+	
 	public Element root;
-
+	
 	public String rootDir;
-
+	
 	public String scriptFile;
-
+	
 	public String version;
-
-	public BaseOldParameters(File paramFile) throws ParserConfigurationException, SAXException, IOException
-	{
+	
+	public BaseOldParameters(File paramFile) throws ParserConfigurationException, SAXException, IOException {
 		this.paramFile = paramFile;
 		this.root = DomUtils.load(paramFile).getDocumentElement();
 	}
-
-	public Element addCorpusNode(String name, String cqpid, String lang, String encoding, boolean annotate)
-	{
+	
+	public Element addCorpusNode(String name, String cqpid, String lang, String encoding, boolean annotate) {
 		if (corporaElement == null)
 			return null;
 		Element corpusElem = root.getOwnerDocument().createElement(CORPUS);
 		corporaElement.appendChild(corpusElem);
-
+		
 		corpusElem.setAttribute(NAME, name);
 		corpusElem.setAttribute("cqpid", cqpid); //$NON-NLS-1$
 		corpusElem.setAttribute(LANG, lang);
 		corpusElem.setAttribute(ENCODING, encoding);
-		corpusElem.setAttribute(ANNOTATE, ""+annotate); //$NON-NLS-1$
-
+		corpusElem.setAttribute(ANNOTATE, "" + annotate); //$NON-NLS-1$
+		
 		corpusElem.appendChild(corpusElem.getOwnerDocument().createElement("texts")); //$NON-NLS-1$
 		corpusElem.appendChild(corpusElem.getOwnerDocument().createElement("queries")); //$NON-NLS-1$
 		corpusElem.appendChild(corpusElem.getOwnerDocument().createElement("xslt")); //$NON-NLS-1$
@@ -173,11 +199,11 @@
 		Element editions = corpusElem.getOwnerDocument().createElement("editions"); //$NON-NLS-1$
 		editions.setAttribute(DEFAULT, DEFAULT);
 		corpusElem.appendChild(editions);
-
+		
 		corpora.put(name, corpusElem);
 		return corpusElem;
 	}
-
+	
 	/**
 	 * Add an edition (already declared in the 'editions' element to a text element
 	 * 
@@ -187,26 +213,26 @@
 	 * @param type default is 'html'
 	 * @return the created Element
 	 */
-	public Element addEdition(Element textElem, String name, String index, String type)
-	{
+	public Element addEdition(Element textElem, String name, String index, String type) {
 		NodeList editionsList = textElem.getElementsByTagName("editions");//$NON-NLS-1$
 		Element editions = null;
 		if (editionsList.getLength() == 0) {
 			editions = textElem.getOwnerDocument().createElement("editions");//$NON-NLS-1$
 			textElem.appendChild(editions);
-		} else {
+		}
+		else {
 			editions = (Element) editionsList.item(0);
 		}
-
+		
 		Element editionElement = editions.getOwnerDocument().createElement("edition");//$NON-NLS-1$
 		editionElement.setAttribute(NAME, name);
 		editionElement.setAttribute("index", index);//$NON-NLS-1$
 		editionElement.setAttribute("type", type);//$NON-NLS-1$
 		editions.appendChild(editionElement);
-
+		
 		return editionElement;
 	}
-
+	
 	/**
 	 * 
 	 * @param corpusElem the corpus Element. the new edition definition will be added to corpusElem/editions
@@ -219,33 +245,32 @@
 		Element editionsElement = getEditionsElement(corpusElem);
 		Element editionElement = editionsElement.getOwnerDocument().createElement("edition");//$NON-NLS-1$
 		editionElement.setAttribute(NAME, name);
-		editionElement.setAttribute("build_edition", ""+DEFAULT_DOEDITION);//$NON-NLS-1$ //$NON-NLS-2$
-		editionElement.setAttribute("page_break_tag", ""+DEFAULT_PAGEELEMENT);//$NON-NLS-1$ //$NON-NLS-2$
-		editionElement.setAttribute("words_per_page", ""+DEFAULT_WORDSPERPAGE);//$NON-NLS-1$ //$NON-NLS-2$
+		editionElement.setAttribute("build_edition", "" + DEFAULT_DOEDITION);//$NON-NLS-1$ //$NON-NLS-2$
+		editionElement.setAttribute("page_break_tag", "" + DEFAULT_PAGEELEMENT);//$NON-NLS-1$ //$NON-NLS-2$
+		editionElement.setAttribute("words_per_page", "" + DEFAULT_WORDSPERPAGE);//$NON-NLS-1$ //$NON-NLS-2$
 		editionElement.setAttribute("mode", mode);//$NON-NLS-1$
 		editionElement.setAttribute("script", script);//$NON-NLS-1$
 		editionElement.setAttribute("type", "html");//$NON-NLS-1$ //$NON-NLS-2$
 		editionElement.setAttribute("index", ".");//$NON-NLS-1$ //$NON-NLS-2$
 		editionsElement.appendChild(editionElement);
-
+		
 		return editionElement;
 	}
-
-	public Element addPage(Element edition, String idx, String wordid)
-	{
+	
+	public Element addPage(Element edition, String idx, String wordid) {
 		Element page = edition.getOwnerDocument().createElement("page");//$NON-NLS-1$
 		page.setAttribute("id", idx);//$NON-NLS-1$
 		page.setAttribute("wordid", wordid);//$NON-NLS-1$
 		edition.appendChild(page);
 		return page;
 	}
-
+	
 	public void addPartition(Element corpusElem, String name, String[] queries,
 			String[] names) {
 		Element preBuildElement = this.getPreBuildElement(corpusElem);
 		Element partitionElem = preBuildElement.getOwnerDocument().createElement("partition");//$NON-NLS-1$
 		partitionElem.setAttribute(NAME, name);
-		for (int i = 0 ; i < queries.length ; i++) {
+		for (int i = 0; i < queries.length; i++) {
 			Element partElem = preBuildElement.getOwnerDocument().createElement("part");//$NON-NLS-1$
 			partElem.setAttribute(NAME, names[i]);
 			partElem.setAttribute(QUERY, queries[i]);
@@ -253,13 +278,13 @@
 		}
 		preBuildElement.appendChild(partitionElem);
 	}
-
-	public Element addPAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory, String inputFormat, String outputFormat)
-	{
+	
+	public Element addPAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory,
+			String inputFormat, String outputFormat) {
 		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");//$NON-NLS-1$
-		if(pattributesList.getLength() == 0)
+		if (pattributesList.getLength() == 0)
 			return null;
-
+		
 		Element pattributes = (Element) pattributesList.item(0);
 		Element pattribute = pattributes.getOwnerDocument().createElement("pattribute");//$NON-NLS-1$
 		pattribute.setAttribute("id", name);//$NON-NLS-1$
@@ -274,47 +299,45 @@
 		pattribute.setAttribute("inputFormat", inputFormat);//$NON-NLS-1$
 		pattribute.setAttribute("outputFormat", outputFormat);//$NON-NLS-1$
 		pattributes.appendChild(pattribute);
-
+		
 		return pattribute;
 	}
-
-	public Element addPreBuildCorpus(Element corpusElem, String name, String query, String exemple)
-	{
+	
+	public Element addPreBuildCorpus(Element corpusElem, String name, String query, String exemple) {
 		NodeList prebuildsList = corpusElem.getElementsByTagName("preBuild");//$NON-NLS-1$
-		if(prebuildsList.getLength() == 0)
+		if (prebuildsList.getLength() == 0)
 			return null;
-
+		
 		Element preBuild = (Element) prebuildsList.item(0);
 		Element subcorpus = preBuild.getOwnerDocument().createElement("subcorpus");//$NON-NLS-1$
 		subcorpus.setAttribute(NAME, name);
 		subcorpus.setAttribute(QUERY, query);
-
+		
 		preBuild.appendChild(subcorpus);
 		return subcorpus;
 	}
-
-	public Element addQuery(Element corpusElem, String name, String query, String desc)
-	{
+	
+	public Element addQuery(Element corpusElem, String name, String query, String desc) {
 		NodeList queriesList = corpusElem.getElementsByTagName("queries");//$NON-NLS-1$
-		if(queriesList.getLength() == 0)
+		if (queriesList.getLength() == 0)
 			return null;
-
+		
 		Element queries = (Element) queriesList.item(0);
 		Element queryElem = queries.getOwnerDocument().createElement(QUERY);
 		queryElem.setAttribute(NAME, name);
 		queryElem.setAttribute(QUERY, query);
 		queryElem.setAttribute(DESC, desc);
-
+		
 		queries.appendChild(queryElem);
 		return queryElem;
 	}
-
-	public Element addSAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory, String inputFormat, String outputFormat)
-	{
+	
+	public Element addSAttribute(Element corpusElem, String name, String shortname, String longname, String type, String renderer, String tooltip, String pattern, String importB, String mandatory,
+			String inputFormat, String outputFormat) {
 		NodeList sattributesList = corpusElem.getElementsByTagName("sattributes");//$NON-NLS-1$
-		if(sattributesList.getLength() == 0)
+		if (sattributesList.getLength() == 0)
 			return null;
-
+		
 		Element sattributes = (Element) sattributesList.item(0);
 		Element sattribute = sattributes.getOwnerDocument().createElement("sattribute");//$NON-NLS-1$
 		sattribute.setAttribute("id", name);//$NON-NLS-1$
@@ -329,10 +352,10 @@
 		sattribute.setAttribute("inputFormat", inputFormat);//$NON-NLS-1$
 		sattribute.setAttribute("outputFormat", outputFormat);//$NON-NLS-1$
 		sattributes.appendChild(sattribute);
-
+		
 		return sattribute;
 	}
-
+	
 	public void addSubcorpus(Element corpusElem, String name, String query,
 			String desc) {
 		Element preBuildElement = this.getPreBuildElement(corpusElem);
@@ -342,7 +365,7 @@
 		subcorpusElem.setAttribute(DESC, desc);
 		preBuildElement.appendChild(subcorpusElem);
 	}
-
+	
 	/**
 	 * 
 	 * @param corpusElem
@@ -350,88 +373,90 @@
 	 * @param sourceFile the XML-TXM file
 	 * @return
 	 */
-	public Element addText(Element corpusElem, String name, File sourceFile)
-	{
+	public Element addText(Element corpusElem, String name, File sourceFile) {
 		NodeList textsList = corpusElem.getElementsByTagName("texts");//$NON-NLS-1$
 		Element texts = null;
 		if (textsList.getLength() == 0) {
 			texts = corpusElem.getOwnerDocument().createElement("texts");//$NON-NLS-1$
 			corpusElem.appendChild(texts);
-		} else {
+		}
+		else {
 			texts = (Element) textsList.item(0);
 		}
-
+		
 		Element text = texts.getOwnerDocument().createElement("text");//$NON-NLS-1$
 		text.setAttribute(NAME, name);
 		texts.appendChild(text);
-
+		
 		Element source = texts.getOwnerDocument().createElement("source");//$NON-NLS-1$
 		source.setAttribute("file", sourceFile.getAbsolutePath());//$NON-NLS-1$
 		source.setAttribute("type", ".xml");//$NON-NLS-1$ //$NON-NLS-2$
 		text.appendChild(source);
 		text.appendChild(texts.getOwnerDocument().createElement("editions"));//$NON-NLS-1$
-
+		
 		return text;
 	}
-
-
+	
+	
 	public Element getTextsElement(Element corpusElement) {
 		NodeList textsList = corpusElement.getElementsByTagName("texts");//$NON-NLS-1$
-		if(textsList.getLength() == 0) {
+		if (textsList.getLength() == 0) {
 			Element texts = corpusElement.getOwnerDocument().createElement("texts");//$NON-NLS-1$
 			corpusElement.appendChild(texts);
 			return texts;
-		} else {
+		}
+		else {
 			Element texts = (Element) textsList.item(0);
 			return texts;
 		}
 	}
-
+	
 	public Element getParametersElement(Element corpusElement) {
 		NodeList parametersList = corpusElement.getElementsByTagName(PARAMETERS);
 		if (parametersList.getLength() == 0) {
 			Element parametersElement = corpusElement.getOwnerDocument().createElement(PARAMETERS);
 			corpusElement.appendChild(parametersElement);
 			return parametersElement;
-		} else {
+		}
+		else {
 			Element parametersElement = (Element) parametersList.item(0);
 			return parametersElement;
 		}
 	}
-
+	
 	public Element getTextElement(Element textsElement, String name) {
 		NodeList textsList = textsElement.getElementsByTagName("text");//$NON-NLS-1$
-
-		for (int i = 0 ; i < textsList.getLength() ;i++) {
+		
+		for (int i = 0; i < textsList.getLength(); i++) {
 			Element text = (Element) textsList.item(i);
 			if (name.equals(text.getAttribute("name"))) return text;//$NON-NLS-1$
 		}
 		return null;
-
+		
 	}
-
+	
 	public Element getEditionElement(Element textElement, String name) {
 		NodeList editionsList = textElement.getElementsByTagName("edition");//$NON-NLS-1$
-
-		for (int i = 0 ; i < editionsList.getLength() ;i++) {
+		
+		for (int i = 0; i < editionsList.getLength(); i++) {
 			Element editionElement = (Element) editionsList.item(i);
 			if (name.equals(editionElement.getAttribute("name"))) {//$NON-NLS-1$
 				return editionElement;
 			}
 		}
-		//System.out.println("Warning no edition found with name="+name);
+		// System.out.println("Warning no edition found with name="+name);
 		return null;
-
+		
 	}
-
+	
 	public void addTokenizerParameter(Element corpusElem, String name, String value) {
 		Element tokenizer = getTokenizerElement(corpusElem);
 		// check if param already exists
 		NodeList paramList = tokenizer.getElementsByTagName(PARAM);
-		for (int i = 0 ; i < paramList.getLength() ; i++) {
-			String pname = ((Element)paramList.item(i)).getAttribute(NAME);
+		for (int i = 0; i < paramList.getLength(); i++) {
+			String pname = ((Element) paramList.item(i)).getAttribute(NAME);
 			if (name.equals(pname)) {
-				((Element)paramList.item(i)).setTextContent(value);
+				((Element) paramList.item(i)).setTextContent(value);
 				return;
 			}
 		}
@@ -440,7 +465,7 @@
 		param.setTextContent(value);
 		tokenizer.appendChild(param);
 	}
-
+	
 	public void addTokenizerTest(Element corpusElem, String regex,
 			String type, String before, String hit, String after) {
 		Element tokenizer = getTokenizerElement(corpusElem);
@@ -452,7 +477,7 @@
 		test.setAttribute("after", after);//$NON-NLS-1$
 		tokenizer.appendChild(test);
 	}
-
+	
 	public void addXsltParameter(Element corpusElem, String name, String value) {
 		Element xslt = getXsltElement(corpusElem);
 		Element param = xslt.getOwnerDocument().createElement(PARAM);
@@ -460,33 +485,32 @@
 		param.setAttribute(VALUE, value);
 		xslt.appendChild(param);
 	}
-
+	
 	public boolean getAvoidXMLSteps(Element corpusElem) {
 		String str = corpusElem.getAttribute(CorpusBuild.AVOIDXMLSTEPS);
 		if (str == null || str.length() == 0) str = AVOIDXMLSTEPSDEFAULT;
 		return TRUE.equals(str);
 	}
-
+	
 	public Element getBibliosElement(Element corpusElem) {
 		return getElement(corpusElem, "biblios");//$NON-NLS-1$
 	}
-
+	
 	public boolean getCleanTEMPDirectories(Element corpusElem) {
-		String str = ""+this.getKeyValueParameters().get("clean.directories"); //$NON-NLS-1$ //$NON-NLS-2$
+		String str = "" + this.getKeyValueParameters().get("clean.directories"); //$NON-NLS-1$ //$NON-NLS-2$
 		if (str == null || str.length() == 0) str = CLEANTEMPDIRSDEFAULT;
 		return TRUE.equals(str);
 	}
-
+	
 	public Element getCorpusElement() {
 		return corpora.get(getCorpusName());
 	}
-
+	
 	/**
 	 * 
 	 * @return the first found corpus name
 	 */
-	public String getCorpusName()
-	{
+	public String getCorpusName() {
 		if (corpora != null) {
 			for (String c : corpora.keySet()) {
 				return c;
@@ -496,12 +520,13 @@
 		Log.warning(NLS.bind(TXMCoreMessages.BaseOldParameters_96, paramFile));
 		return null;
 	}
-
+	
 	public Element getCQLLimitElement(Element uiElement) {
 		NodeList uiList = uiElement.getElementsByTagName("context_limits");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			return (Element)(uiList.item(0));
-		} else {
+			return (Element) (uiList.item(0));
+		}
+		else {
 			Element context_limitsElement = uiElement.getOwnerDocument().createElement("context_limits");//$NON-NLS-1$
 			context_limitsElement.setAttribute("type", "list");//$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
 			context_limitsElement.setTextContent(DEFAULT_CQPLIMITS);
@@ -509,48 +534,51 @@
 			return context_limitsElement;
 		}
 	}
-
+	
 	public Element getWordElement() {
 		Element textualPlanEelement = getTextualPlans();
 		NodeList uiList = textualPlanEelement.getElementsByTagName("word");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			return (Element)(uiList.item(0));
-		} else {
+			return (Element) (uiList.item(0));
+		}
+		else {
 			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("word");//$NON-NLS-1$
 			wordElement.setTextContent("w");//$NON-NLS-1$
 			textualPlanEelement.appendChild(wordElement);
 			return wordElement;
 		}
 	}
-
+	
 	public Element getMilestonesElement() {
 		Element textualPlanEelement = getTextualPlans();
 		NodeList uiList = textualPlanEelement.getElementsByTagName("milestones");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			return (Element)(uiList.item(0));
-		} else {
+			return (Element) (uiList.item(0));
+		}
+		else {
 			Element wordElement = textualPlanEelement.getOwnerDocument().createElement("milestones");//$NON-NLS-1$
 			wordElement.setTextContent(""); //$NON-NLS-1$
 			textualPlanEelement.appendChild(wordElement);
 			return wordElement;
 		}
 	}
-
+	
 	public Element setWordElement(String tag) {
 		if (tag == null) return null;
 		tag = tag.trim();
 		if (tag.length() == 0) return null;
-
+		
 		getWordElement().setTextContent(tag);
 		return getWordElement();
 	}
-
+	
 	public Element getOutSideTextTagsElement() {
 		Element textualPlanEelement = getTextualPlans();
 		NodeList uiList = textualPlanEelement.getElementsByTagName("outsidetexttags");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			return (Element)(uiList.item(0));
-		} else {
+			return (Element) (uiList.item(0));
+		}
+		else {
 			Element context_limitsElement = textualPlanEelement.getOwnerDocument().createElement("outsidetexttags");//$NON-NLS-1$
 			context_limitsElement.setAttribute("type", "list");//$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
 			context_limitsElement.setTextContent("");//$NON-NLS-1$
@@ -563,8 +591,9 @@
 		Element textualPlanEelement = getTextualPlans();
 		NodeList uiList = textualPlanEelement.getElementsByTagName("outside_text_tags_and_keep_content");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			return (Element)(uiList.item(0));
-		} else {
+			return (Element) (uiList.item(0));
+		}
+		else {
 			Element element = textualPlanEelement.getOwnerDocument().createElement("outside_text_tags_and_keep_content");//$NON-NLS-1$
 			element.setAttribute("type", "list");//$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
 			element.setTextContent("");//$NON-NLS-1$
@@ -577,8 +606,9 @@
 		Element textualPlanElement = getTextualPlans();
 		NodeList noteList = textualPlanElement.getElementsByTagName("note");//$NON-NLS-1$
 		if (noteList.getLength() > 0) {
-			return (Element)(noteList.item(0));
-		} else {
+			return (Element) (noteList.item(0));
+		}
+		else {
 			Element element = textualPlanElement.getOwnerDocument().createElement("note");//$NON-NLS-1$
 			element.setAttribute("type", "list");//$NON-NLS-1$ //$NON-NLS-2$
 			element.setTextContent("");//$NON-NLS-1$
@@ -586,7 +616,7 @@
 			return element;
 		}
 	}
-
+	
 	public boolean getDoEdition(String edition) {
 		Element corpusElement = getCorpusElement();
 		if (corpusElement == null) return DEFAULT_DOEDITION;
@@ -594,39 +624,39 @@
 		if (editionsElement == null) return DEFAULT_DOEDITION;
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_DOEDITION;
-
+		
 		String value = editionElement.getAttribute("build_edition");//$NON-NLS-1$
 		if (value == null | value.length() == 0) return DEFAULT_DOEDITION;
-
+		
 		return TRUE.equals(value);
 	}
-
-	/** 
-	 *  
+	
+	/**
+	 * 
 	 * @param editionsElem
 	 * @param name
 	 * @return the edition Element corresponding to the asked edition name
 	 */
 	public Element getEditionDefinitionElement(Element editionsElem, String name) {
 		NodeList editionList = editionsElem.getElementsByTagName("edition");//$NON-NLS-1$
-		for (int i = 0 ; i < editionList.getLength() ; i++) {
-			Element elem = (Element)editionList.item(i);
+		for (int i = 0; i < editionList.getLength(); i++) {
+			Element elem = (Element) editionList.item(i);
 			if (name.equals(elem.getAttribute("name")))//$NON-NLS-1$
 				return elem;
 		}
 		//
-		//		Element editionElement = editionsElem.getOwnerDocument().createElement("edition");
-		//		editionElement.setAttribute("name", name);
-		//		editionElement.setAttribute("build_edition", ""+DEFAULT_DOEDITION);
-		//		editionElement.setAttribute("page_break_tag", ""+DEFAULT_PAGEELEMENT);
-		//		editionElement.setAttribute("words_per_page", ""+DEFAULT_WORDSPERPAGE);
-		//		editionElement.setAttribute("mode", "groovy");
-		//		editionElement.setAttribute("script", "pager.groovy");
-		//		editionElement.setAttribute("type", "html");
-		//		editionElement.setAttribute("index", ".");
+		// Element editionElement = editionsElem.getOwnerDocument().createElement("edition");
+		// editionElement.setAttribute("name", name);
+		// editionElement.setAttribute("build_edition", ""+DEFAULT_DOEDITION);
+		// editionElement.setAttribute("page_break_tag", ""+DEFAULT_PAGEELEMENT);
+		// editionElement.setAttribute("words_per_page", ""+DEFAULT_WORDSPERPAGE);
+		// editionElement.setAttribute("mode", "groovy");
+		// editionElement.setAttribute("script", "pager.groovy");
+		// editionElement.setAttribute("type", "html");
+		// editionElement.setAttribute("index", ".");
 		return null;
 	}
-
+	
 	/**
 	 * returns the corpus "editions" element and creates it if missing
 	 * 
@@ -642,7 +672,7 @@
 			elem.setAttribute(DEFAULT, DEFAULT);
 		return elem;
 	}
-
+	
 	/**
 	 * Utility to get the first 'name' element from a node 'elem'
 	 * 
@@ -654,35 +684,35 @@
 		NodeList editionsList = elem.getElementsByTagName(tag);
 		if (editionsList.getLength() > 0)
 			return (Element) editionsList.item(0);
-
+		
 		Element editionsElem = elem.getOwnerDocument().createElement(tag);
 		elem.appendChild(editionsElem);
 		return editionsElem;
 	}
-
+	
 	public ArrayList<String> getExcludeXpaths() {
 		Element filter = getFilterElement();
-		ArrayList<String> xpaths = new ArrayList<String>();
+		ArrayList<String> xpaths = new ArrayList<>();
 		NodeList excludeList = filter.getElementsByTagName("exclude");//$NON-NLS-1$
-		for (int i = 0 ; i < excludeList.getLength() ; i++) {
+		for (int i = 0; i < excludeList.getLength(); i++) {
 			Element exclude = (Element) excludeList.item(i);
 			if ("xpath".equals(exclude.getAttribute("type")))//$NON-NLS-1$ //$NON-NLS-2$ $NON-NLS-2$
 				xpaths.add(exclude.getTextContent().trim());
 		}
 		return xpaths;
 	}
-
+	
 	public Element getFilterElement() {
 		Element corpusElem = corpora.get(getCorpusName());
 		return getElement(corpusElem, "xmlfilter");//$NON-NLS-1$
 	}
-
+	
 	public String getLang(Element corpusElem) {
 		String str = corpusElem.getAttribute(LANG);
 		if (str == null) str = System.getProperty("user.locale");//$NON-NLS-1$
 		return str;
 	}
-
+	
 	public String getPageElement(String edition) {
 		Element corpusElement = getCorpusElement();
 		if (corpusElement == null) return DEFAULT_PAGEELEMENT;
@@ -690,69 +720,69 @@
 		if (editionsElement == null) return DEFAULT_PAGEELEMENT;
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_PAGEELEMENT;
-
+		
 		String value = editionElement.getAttribute("page_break_tag");//$NON-NLS-1$
 		if (value == null || value.length() == 0) return DEFAULT_PAGEELEMENT;
-
+		
 		return value;
 	}
-
+	
 	public NodeList getPAttributes(Element corpusElem) {
 		NodeList pattributesList = corpusElem.getElementsByTagName("pattributes");//$NON-NLS-1$
-		if(pattributesList.getLength() == 0)
+		if (pattributesList.getLength() == 0)
 			return null;
-		return ((Element)pattributesList.item(0)).getElementsByTagName("pattribute");//$NON-NLS-1$
+		return ((Element) pattributesList.item(0)).getElementsByTagName("pattribute");//$NON-NLS-1$
 	}
-
+	
 	public Element getPAttributesElement(Element corpusElem) {
 		return getElement(corpusElem, "pattributes");//$NON-NLS-1$
 	}
-
+	
 	public Element getPreBuildElement() {
 		Element corpusElem = corpora.get(getCorpusName());
 		return getElement(corpusElem, "preBuild");//$NON-NLS-1$
 	}
-
+	
 	public Element getPreBuildElement(Element corpusElem) {
 		return getElement(corpusElem, "preBuild");//$NON-NLS-1$
 	}
-
+	
 	public Element getQueriesElement(Element corpusElem) {
 		return getElement(corpusElem, "queries");//$NON-NLS-1$
 	}
-
+	
 	public Element getSAttributesElement(Element corpusElem) {
 		return getElement(corpusElem, "sattributes");//$NON-NLS-1$
 	}
-
+	
 	public Element getTokenizerElement(Element corpusElem) {
 		return getElement(corpusElem, "tokenizer");//$NON-NLS-1$
 	}
-
+	
 	public Element getUIElement(Element corpusElem, String command) {
 		Element uisElement = getUIsElement(corpusElem);
 		Element uiElement = null;
 		NodeList uiList = uisElement.getElementsByTagName("ui");//$NON-NLS-1$
 		if (uiList.getLength() > 0) {
-			for (int i = 0 ; i < uiList.getLength() ; i++ ) {
-				Element ui = (Element)(uiList.item(i));
+			for (int i = 0; i < uiList.getLength(); i++) {
+				Element ui = (Element) (uiList.item(i));
 				if (command.equals(ui.getAttribute("command"))) {//$NON-NLS-1$
 					return ui;
 				}
 			}
-		} 
-		if (uiElement == null){
+		}
+		if (uiElement == null) {
 			uiElement = uisElement.getOwnerDocument().createElement("ui");//$NON-NLS-1$
 			uiElement.setAttribute("command", command);//$NON-NLS-1$
 			uisElement.appendChild(uiElement);
 		}
 		return uiElement;
 	}
-
+	
 	public Element getUIsElement(Element corpusElem) {
 		return getElement(corpusElem, "uis"); //$NON-NLS-1$
 	}
-
+	
 	public int getWordsPerPage(String edition) {
 		Element corpusElement = getCorpusElement();
 		if (corpusElement == null) return DEFAULT_WORDSPERPAGE;
@@ -760,32 +790,33 @@
 		if (editionsElement == null) return DEFAULT_WORDSPERPAGE;
 		Element editionElement = getEditionDefinitionElement(editionsElement, edition);
 		if (editionElement == null) return DEFAULT_WORDSPERPAGE;
-
+		
 		String value = editionElement.getAttribute("words_per_page");//$NON-NLS-1$
 		if (value == null) return DEFAULT_WORDSPERPAGE;
-
+		
 		try {
 			return Integer.parseInt(value);
-		} catch (NumberFormatException e) {
-			Log.fine("words_per_page value is not an Integer value: "+value);//$NON-NLS-1$
+		}
+		catch (NumberFormatException e) {
+			Log.fine("words_per_page value is not an Integer value: " + value);//$NON-NLS-1$
 			return DEFAULT_WORDSPERPAGE;
 		}
 	}
-
+	
 	public Element getXsltElement(Element corpusElem) {
 		Element elem = getElement(corpusElem, "xslt");//$NON-NLS-1$
 		if (!elem.hasAttribute("xsl"))//$NON-NLS-1$
 			elem.setAttribute("xsl", "");//$NON-NLS-1$ //$NON-NLS-2$
 		return elem;
 	}
-
+	
 	public HashMap<String, String> getXsltParams(Element corpusElem) {
 		Element elem = getElement(corpusElem, "xslt");//$NON-NLS-1$
 		if (!elem.hasAttribute("xsl"))//$NON-NLS-1$
 			elem.setAttribute("xsl", "");//$NON-NLS-1$ //$NON-NLS-2$
-		HashMap<String, String> hash = new HashMap<String, String>();
+		HashMap<String, String> hash = new HashMap<>();
 		NodeList params = elem.getElementsByTagName("param");//$NON-NLS-1$
-		for(int i = 0 ; i < params.getLength() ; i++) {
+		for (int i = 0; i < params.getLength(); i++) {
 			Element paramElem = (Element) params.item(i);
 			String name = paramElem.getAttribute("name");//$NON-NLS-1$
 			String value = paramElem.getAttribute("value");//$NON-NLS-1$
@@ -795,11 +826,11 @@
 		}
 		return hash;
 	}
-
+	
 	public void loadKeyValueParameters(Element parametersElem) {
-		//HashMap<String, String> hash = new HashMap<String, String>();
+		// HashMap<String, String> hash = new HashMap<String, String>();
 		NodeList params = parametersElem.getElementsByTagName("param");//$NON-NLS-1$
-		for (int i = 0 ; i < params.getLength() ; i++) {
+		for (int i = 0; i < params.getLength(); i++) {
 			Element paramElem = (Element) params.item(i);
 			String name = paramElem.getAttribute(PARAMETERKEY);
 			String value = paramElem.getAttribute(PARAMETERVALUE);
@@ -810,18 +841,19 @@
 	}
 	
 	public void saveKeyValueParameters(Element parametersElem) {
-		//HashMap<String, String> hash = new HashMap<String, String>();
+		// HashMap<String, String> hash = new HashMap<String, String>();
 		
 		NodeList params = parametersElem.getElementsByTagName("param");//$NON-NLS-1$
-		HashSet<String> existingNames = new HashSet<String>();
-		for (int i = 0 ; i < params.getLength() ; i++) {
+		HashSet<String> existingNames = new HashSet<>();
+		for (int i = 0; i < params.getLength(); i++) {
 			Element paramElem = (Element) params.item(i);
 			String name = paramElem.getAttribute(PARAMETERKEY);
 			existingNames.add(name);
 			if (keyValueParameters.containsKey(name)) { // update existing element
 				String value = keyValueParameters.get(name).toString();
 				paramElem.setAttribute(PARAMETERVALUE, value);
-			} else { // the parameter has been removed -> delete element
+			}
+			else { // the parameter has been removed -> delete element
 				parametersElem.removeChild(paramElem);
 			}
 		}
@@ -835,12 +867,12 @@
 			}
 		}
 	}
-
-
-	public  HashMap<String, Object> getKeyValueParameters() {
+	
+	
+	public HashMap<String, Object> getKeyValueParameters() {
 		return keyValueParameters;
 	}
-
+	
 	/**
 	 * Load import infos.
 	 *
@@ -853,13 +885,15 @@
 		try {
 			if (root.getAttribute(DATE).matches("....-..-..")) {//$NON-NLS-1$
 				this.date = dateformat.parse(root.getAttribute(DATE));
-			} else { // try with DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK)
+			}
+			else { // try with DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK)
 				this.date = shortUKDateformat.parse(root.getAttribute(DATE));
-				//System.out.println("Warning in "+paramFile+": date format '"+root.getAttribute(DATE)+"' does not match '....-..-..', date is set to "+this.date);
+				// System.out.println("Warning in "+paramFile+": date format '"+root.getAttribute(DATE)+"' does not match '....-..-..', date is set to "+this.date);
 			}
-		} catch (ParseException e) {
+		}
+		catch (ParseException e) {
 			this.date = new Date(0);
-			System.out.println("Warning: can't parse date '"+root.getAttribute(DATE)+"' in file "+paramFile+": "+e);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			System.out.println("Warning: can't parse date '" + root.getAttribute(DATE) + "' in file " + paramFile + ": " + e);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 		this.version = root.getAttribute("version");//$NON-NLS-1$
 		this.name = root.getAttribute(NAME).toUpperCase();
@@ -868,71 +902,74 @@
 		this.description = root.getAttribute(DESC);
 		this.rootDir = root.getAttribute("rootDir");//$NON-NLS-1$
 		this.scriptFile = root.getAttribute("script");//$NON-NLS-1$
-
+		
 		// get Alignements
 		NodeList alignNodes = root.getElementsByTagName("linkGrp"); //$NON-NLS-1$
 		if (alignNodes.getLength() > 0) {
 			Element alignNode = (Element) alignNodes.item(0);
 			NodeList linkNodes = alignNode.getElementsByTagName(LINK);
-			for (int i = 0 ; i < linkNodes.getLength() ; i++) {
-				Element link = (Element)linkNodes.item(i);
+			for (int i = 0; i < linkNodes.getLength(); i++) {
+				Element link = (Element) linkNodes.item(i);
 				String target = link.getAttribute(TARGET);
 				String[] split = target.split("#");//$NON-NLS-1$
 				if (split.length != 3) {
-					System.out.println("Error: linkGrp/link/@target malformed: "+target);//$NON-NLS-1$
+					System.out.println("Error: linkGrp/link/@target malformed: " + target);//$NON-NLS-1$
 					continue;
 				}
 				String from = split[1].trim();
 				String to = split[2].trim();
-
-				links.put("#"+to+" #"+from, link);//$NON-NLS-1$ //$NON-NLS-2$
+				
+				links.put("#" + to + " #" + from, link);//$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
-
+		
 		// corpora
 		NodeList corporaNodes = root.getElementsByTagName("corpora");//$NON-NLS-1$
 		if (corporaNodes.getLength() > 0) {
 			corporaElement = (Element) corporaNodes.item(0);
 			NodeList corpusNodes = corporaElement.getElementsByTagName(CORPUS);
-			for (int i = 0 ; i < corpusNodes.getLength() ; i++) {
-
-				Element corpusElement = (Element)corpusNodes.item(i);
+			for (int i = 0; i < corpusNodes.getLength(); i++) {
+				
+				Element corpusElement = (Element) corpusNodes.item(i);
 				String id = corpusElement.getAttribute(NAME);
 				corpora.put(id, corpusElement);
-
+				
 				// replace the properties file of some import module
 				Element parametersElement = getParametersElement(corpusElement);
 				loadKeyValueParameters(parametersElement);
 			}
 		}
-
+		
 		return true;
 	}
-
+	
 	public boolean save() {
 		return save(this.paramFile);
 	}
-
+	
 	public boolean save(File paramFile) {
 		try {
 			this.saveToElement(); // save informations
 			this.saveKeyValueParameters(getParametersElement(getCorpusElement())); // save additional parameters
 			return DomUtils.save(root.getOwnerDocument(), paramFile);
-		} catch (Exception e) {
-			System.out.println("Fail to save parameters in "+paramFile+". Reason: "+e);//$NON-NLS-1$ //$NON-NLS-2$
+		}
+		catch (Exception e) {
+			System.out.println("Fail to save parameters in " + paramFile + ". Reason: " + e);//$NON-NLS-1$ //$NON-NLS-2$
 			org.txm.utils.logger.Log.printStackTrace(e);
 		}
 		return false;
 	}
-
+	
 	public void saveToElement() {
 		root.setAttribute(NAME, name);
 		root.setAttribute(DESC, description);
 		root.setAttribute("script", scriptFile);//$NON-NLS-1$
 		root.setAttribute("rootDir", rootDir);//$NON-NLS-1$
+		root.setAttribute("version", version);//$NON-NLS-1$
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */
 	@Override
@@ -940,9 +977,9 @@
 		return "BaseOldParameters [name=" + name + ", date=" + date + ", author=" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				+ author + ", version=" + version + ", description=" //$NON-NLS-1$ //$NON-NLS-2$
 				+ description + ",\n links=" + links + ", corpora=" + corpora //$NON-NLS-1$ //$NON-NLS-2$
-				+ ",\n root=" + root + ", corporaElement=" + corporaElement + ", keyValueParameters="+super.toString()+"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				+ ",\n root=" + root + ", corporaElement=" + corporaElement + ", keyValueParameters=" + super.toString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 	}
-
+	
 	public String getCQPLimits() {
 		Element concordanceElement = this.getUIElement(getCorpusElement(), "concordance");//$NON-NLS-1$
 		if (concordanceElement != null) {
@@ -955,6 +992,7 @@
 		}
 		return DEFAULT_CQPLIMITS;
 	}
+	
 	public Element getTextualPlans() {
 		Element uiElement = this.getUIElement(this.getCorpusElement(), "textualplans");//$NON-NLS-1$
 		if (uiElement == null) {
@@ -977,10 +1015,10 @@
 		if (editionsElement == null) return ""; //$NON-NLS-1$
 		Element editionElement = getEditionDefinitionElement(editionsElement, "facs"); //$NON-NLS-1$
 		if (editionElement == null) return ""; //$NON-NLS-1$
-
+		
 		String value = editionElement.getAttribute("images_directory");//$NON-NLS-1$
 		if (value == null || value.length() == 0) return ""; //$NON-NLS-1$
-
+		
 		return value;
 	}
 	
@@ -991,10 +1029,10 @@
 		if (editionsElement == null) return false;
 		Element editionElement = getEditionDefinitionElement(editionsElement, "facs"); //$NON-NLS-1$
 		if (editionElement == null) return false;
-
+		
 		String value = editionElement.getAttribute("build_edition"); //$NON-NLS-1$
 		if (value == null | value.length() == 0) return DEFAULT_DOEDITION;
-
+		
 		return TRUE.equals(value);
 	}
 	
@@ -1031,7 +1069,8 @@
 			
 			Element milestonesElement = getMilestonesElement();
 			milestonesElement.setTextContent(milestoneElements.trim());
-		} else {
+		}
+		else {
 			System.out.println("Error: Textual plan parameters not saved."); //$NON-NLS-1$
 		}
 	}
@@ -1040,10 +1079,10 @@
 		Element editionsElement = this.getEditionsElement(this.getCorpusElement());
 		if (editionsElement != null) {
 			Element defaultEditionElement = this.getEditionDefinitionElement(editionsElement, "default"); //$NON-NLS-1$
-
+			
 			if (defaultEditionElement != null) {
 				defaultEditionElement.setAttribute("words_per_page", Integer.toString(n)); //$NON-NLS-1$
-			} 
+			}
 		}
 	}
 	
@@ -1051,13 +1090,13 @@
 		Element editionsElement = this.getEditionsElement(this.getCorpusElement());
 		if (editionsElement != null) {
 			Element defaultEditionElement = this.getEditionDefinitionElement(editionsElement, "default"); //$NON-NLS-1$
-
+			
 			if (defaultEditionElement != null) {
 				defaultEditionElement.setAttribute("page_break_tag", pageBreak); //$NON-NLS-1$
-			} 
+			}
 		}
 	}
-
+	
 	public void initializeProject(Project project) {
 		EditionDefinition defaultEditionDef = project.getEditionDefinition("default"); //$NON-NLS-1$
 		defaultEditionDef.setBuildEdition(this.getDoEdition("default")); //$NON-NLS-1$
@@ -1073,7 +1112,7 @@
 		facsEditionDef.setBuildEdition(this.getDoEdition("facs")); //$NON-NLS-1$
 		facsEditionDef.setWordsPerPage(this.getWordsPerPage("facs")); //$NON-NLS-1$
 		facsEditionDef.setPageBreakTag(this.getPageElement("facs")); //$NON-NLS-1$
-		facsEditionDef.setImagesDirectory(this.getFacsEditionImageDirectory()); //$NON-NLS-1$
+		facsEditionDef.setImagesDirectory(this.getFacsEditionImageDirectory());
 		
 		if (this.getCorpusElement().getAttribute("font") != null) { //$NON-NLS-1$
 			project.setFont(this.getCorpusElement().getAttribute("font")); //$NON-NLS-1$
@@ -1091,7 +1130,7 @@
 		}
 		
 		NodeList nodes = this.getTokenizerElement(this.getCorpusElement()).getElementsByTagName("param"); //$NON-NLS-1$
-		for (int i = 0 ; i < nodes.getLength() ; i++) {
+		for (int i = 0; i < nodes.getLength(); i++) {
 			Element paramElement = (Element) nodes.item(i);
 			project.addTokenizerParameter(paramElement.getAttribute("name"), paramElement.getTextContent()); //$NON-NLS-1$
 		}
Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2981)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 2982)
@@ -74,6 +74,8 @@
 import org.w3c.dom.Element;
 import org.xml.sax.SAXException;
 
+import com.sun.org.apache.bcel.internal.generic.CPInstruction;
+
 /**
  * The Class Project represent a Corpus project with its sources, corpus indexes, texts, editions, pages, etc.
  */
@@ -658,6 +660,8 @@
 			this.pImportModuleName = "xtz";
 		}
 		
+		this.setAnnotate("true".equals(params.getCorpusElement().getAttribute("annotate"))); //$NON-NLS-1$ );
+		
 		this.pSrcDirectory = params.paramFile.getParentFile();
 		if (pSrcDirectory == null) {
 			pSrcDirectory = new File(getProjectDirectory(), "src");
@@ -829,7 +833,7 @@
 	}
 	
 	public boolean export(File exportzip) {
-		return export(exportzip, null, null);
+		return export(exportzip, null, null, null);
 	}
 	
 	/**
@@ -838,12 +842,80 @@
 	 * @param exportzip the exportzip
 	 * @return true, if successful
 	 */
-	public boolean export(File exportzip, IProgressMonitor monitor, HashSet<String> ignore) {
+	public boolean export(File exportzip, IProgressMonitor monitor, HashSet<String> ignore, String version) {
 		File binarydir = this.getProjectDirectory();
 		
 		if (binarydir.exists() && exportzip.getParentFile().exists()) {
 			this.save();
 			
+			if ("0.7.9".equals(version)) {
+				File importXMLFile = new File(binarydir, "import.xml");
+				try {
+					CorpusBuild cb = this.getCorpusBuild(this.getName().toUpperCase());
+					
+					BaseOldParameters.createEmptyParams(importXMLFile, this.getProjectDirectory().getName());
+					BaseOldParameters bp = new BaseOldParameters(importXMLFile);
+					bp.load();
+					Element corpusElem = bp.getCorpusElement();
+					corpusElem.setAttribute("cqpid", cb.getID());
+					
+					bp.author = this.getAuthor();
+					bp.date = this.getCreationDate();
+					bp.description = cb.getDescription();
+					bp.version = "0.7";
+					bp.rootDir = this.getSrcdir().getPath();
+					bp.scriptFile = this.getImportModuleName() + "Loader.groovy";
+					
+					// Element elementCb = bp.addCorpusNode(cb.getName(), cb.getID(), cb.getLang(), this.getEncoding(), this.getAnnotate());
+					bp.setAnnotationLang(this.getLang());
+					bp.setDoAnnotation(this.getAnnotate());
+					bp.setSkipTokenization(!this.getDoTokenizerStep());
+					
+					Element tokenizerElement = bp.getTokenizerElement(corpusElem);
+					Element tmp = bp.root.getOwnerDocument().createElement("param");
+					tmp.setAttribute("name", "whitespaces");
+					tmp.setTextContent(this.getTokenizerParameter("whitespaces", ""));
+					tokenizerElement.appendChild(tmp);
+					tmp = bp.root.getOwnerDocument().createElement("param");
+					tmp.setAttribute("name", "regPunct");
+					tmp.setTextContent(this.getTokenizerParameter("regPunct", ""));
+					tokenizerElement.appendChild(tmp);
+					tmp = bp.root.getOwnerDocument().createElement("param");
+					tmp.setAttribute("name", "punct_strong");
+					tmp.setTextContent(this.getTokenizerParameter("punct_strong", ""));
+					tokenizerElement.appendChild(tmp);
+					tmp = bp.root.getOwnerDocument().createElement("param");
+					tmp.setAttribute("name", "regElision");
+					tmp.setTextContent(this.getTokenizerParameter("regElision", ""));
+					tokenizerElement.appendChild(tmp);
+					
+					EditionDefinition ed = this.getEditionDefinition("default");
+					bp.setPageBreakElement(ed.getPageElement());
+					bp.setWordsPerPage(ed.getWordsPerPage());
+					
+					bp.setTextualPlans(this.getTextualPlan("OutSideTextTagsAndKeepContent"), this.getTextualPlan("Note"), this.getTextualPlan("OutSideTextTags"), this.getTextualPlan("MileStones"));
+					bp.setWordElement(this.getTokenizerWordElement());
+					
+					
+					for (Text t : this.getTexts()) {
+						Element elementT = bp.addText(corpusElem, t.getName(), t.getSource());
+						for (Edition e : t.getEditions()) {
+							Element elementE = bp.addEdition(elementT, e.getName(), e.getHtmlDir().getPath(), "html");
+							for (int i = 0; i < e.getNumPages(); i++) {
+								Page p = e.getPage(i);
+								bp.addPage(elementE, p.name, p.firstWordId);
+							}
+						}
+					}
+					
+					bp.getKeyValueParameters().put("lang", this.getLang());
+					bp.save();
+				}
+				catch (Exception e) {
+					Log.printStackTrace(e);
+				}
+			}
+			
 			try {
 				Zip.compress(binarydir, exportzip, monitor, ignore);
 			}
@@ -1153,6 +1225,11 @@
 		return new String[0];
 	}
 	
+	/**
+	 * 
+	 * @param name OutSideTextTags, OutSideTextTagsAndKeepContent, Note, MileStones
+	 * @return empty String if the textual plan is not set
+	 */
 	public String getTextualPlan(String name) {
 		return this.getPreferencesScope().getNode("TextualPlans").get(name, "");
 	}
Index: tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ExportCorpus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ExportCorpus.java	(revision 2981)
+++ tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ExportCorpus.java	(revision 2982)
@@ -28,6 +28,7 @@
 package org.txm.searchengine.cqp.rcp.handlers.base;
 
 import java.io.File;
+import java.util.HashSet;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -55,15 +56,15 @@
  * Export a corpus to the .txm binary format (Zip)
  */
 public class ExportCorpus extends AbstractHandler {
-
+	
 	public final static String ID = "org.txm.rcp.commands.base.ExportCorpus"; //$NON-NLS-1$
-
+	
 	/** The selection. */
 	private IStructuredSelection selection;
-
+	
 	/** The lastopenedfile. */
 	private static String lastopenedfile;
-
+	
 	/*
 	 * (non-Javadoc)
 	 * @see
@@ -73,15 +74,15 @@
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
-
+		
 		Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
 				.getShell();
-
+		
 		if (!(selection.getFirstElement() instanceof MainCorpus))
 			return null;
-
+		
 		final MainCorpus corpus = (MainCorpus) selection.getFirstElement();
-
+		
 		try {
 			corpus.compute(false);
 		}
@@ -90,19 +91,21 @@
 			e.printStackTrace();
 			return null;
 		}
-
+		
 		if (corpus.isModified()) {
 			boolean ret = MessageDialog.openConfirm(shell, "Export - " + corpus.getName() + " annotations not saved",
 					"Do you wish to export without the current annotations?\n\n(to include the current annotations in the exported corpus, you need to save them before calling the \"Export\" command)");
 			if (!ret) return null;
 		}
-
-		ExportCorpusDialog dialog = new ExportCorpusDialog(shell, corpus);
-
-		if (dialog.open() == Window.OK) {
-
-			final File outfile = dialog.getZipFile();
-
+		
+		ExportCorpusDialog dialog2 = new ExportCorpusDialog(shell, corpus);
+		
+		if (dialog2.open() == Window.OK) {
+			
+			final File outfile = dialog2.getZipFile();
+			final String version = dialog2.getCorpusVersion();
+			final HashSet<String> ignored = dialog2.getIgnoreNames();
+			
 			if (outfile.exists()) {
 				boolean ret = MessageDialog.openConfirm(shell, "Export - " + corpus.getName() + " warning",
 						TXMUIMessages.bind(TXMUIMessages.theP0FileAlreadyExistsWouldYouLikeToReplaceIt, outfile.getAbsoluteFile()));
@@ -111,22 +114,20 @@
 					return null;
 				}
 			}
-
+			
 			Log.info(NLS.bind(TXMUIMessages.exportingP0, corpus.getName()));
 			JobHandler jobhandler = new JobHandler(NLS.bind(TXMUIMessages.exportingP0, corpus.getName())) {
-
+				
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
 					this.runInit(monitor);
 					try {
 						monitor.beginTask(NLS.bind(TXMUIMessages.exportingP0ThisMayTakeAWhile, corpus.getName()), 100);
-
-
-
-						if (!corpus.export(outfile, this, dialog.getIgnoreNames())) {
+						
+						if (!corpus.export(outfile, this, ignored, version)) {
 							System.out.println(NLS.bind(TXMUIMessages.failedToExportCorpusP0, corpus.getName()));
 						}
-
+						
 						System.out.println(TXMUIMessages.bind(TXMUIMessages.doneTheCreatedBinaryFileIsP0, outfile.getAbsolutePath()));
 						monitor.worked(100);
 					}
@@ -141,7 +142,7 @@
 			};
 			jobhandler.startJob();
 		}
-
+		
 		return null;
 	}
 }
Index: tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java	(revision 2981)
+++ tmp/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java	(revision 2982)
@@ -12,6 +12,7 @@
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.CellLabelProvider;
 import org.eclipse.jface.viewers.TableViewer;
@@ -24,6 +25,7 @@
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.FileDialog;
@@ -60,8 +62,12 @@
 	
 	private Text textField;
 	
+	private Combo versionField;
+	
 	private Button selectButton;
 	
+	private String version;
+	
 	public final static String ID = ExportCorpusDialog.class.getName();
 	
 	/**
@@ -138,6 +144,16 @@
 			public void widgetDefaultSelected(SelectionEvent e) {}
 		});
 		
+		new Label(comp, SWT.NONE).setText("Corpus version");
+		versionField = new Combo(comp, SWT.SINGLE | SWT.READ_ONLY);
+		versionField.setItems("0.8.0", "0.7.9");
+		versionField.select(0);
+		GridData gdata = GridDataFactory.fillDefaults().create();
+		gdata.widthHint = 50;
+		gdata.horizontalSpan = 2;
+		versionField.setLayoutData(gdata);
+		
+		// File selection section
 		selectedFiles = new LinkedHashMap<>();
 		Project project = corpus.getProject();
 		File directory = project.getProjectDirectory();
@@ -272,14 +288,30 @@
 	protected void buttonPressed(int buttonId) {
 		if (buttonId == Dialog.OK) {
 			zipFile = new File(textField.getText());
+			version = versionField.getText();
 		}
 		super.buttonPressed(buttonId);
 	}
 	
+	/**
+	 * 
+	 * @return the ZIP file to create
+	 */
 	public File getZipFile() {
 		return zipFile;
 	}
 	
+	/**
+	 * 
+	 * @return The corpus version to produce
+	 */
+	public String getCorpusVersion() {
+		return version;
+	}
+	
+	/**
+	 * @return The corpus version to produce
+	 */
 	public LinkedHashMap<File, Boolean> getFileSelection() {
 		return selectedFiles;
 	}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2981)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2982)
@@ -226,8 +226,7 @@
 		println "sAttributes: $sAttributes"
 		//return;
 		try {
-			cwbEn.run(dataDir.getAbsolutePath(),
-					cqpFile.getAbsolutePath(),
+			cwbEn.run(dataDir.getAbsolutePath(), cqpFile.getAbsolutePath(),
 					registryFile.getAbsolutePath(), pAttributes, sAttributes);
 			if (!registryFile.exists()) {
 				println "Error: The registry file was not created: $registryFile. See https://groupes.renater.fr/wiki/txm-users/public/faq"
@@ -610,6 +609,7 @@
 	}
 
 	public static int MAXATTRIBUTEVALUELENGTH = 8191;
+	
 	/**
 	 * Parses the infos.
 	 */
@@ -649,7 +649,7 @@
 
 						for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
 							list.add(new Pair(parser.getAttributeLocalName(i).replace("_","").toLowerCase(), parser.getAttributeValue(i)));
-							if(parser.getAttributeLocalName(i).startsWith("enq"))
+							if (parser.getAttributeLocalName(i).startsWith("enq"))
 								interviewers.add(parser.getAttributeValue(i));
 						}
 						return
