Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 3182)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 3183)
@@ -122,7 +122,7 @@
 	for (String t : metadatas.keySet()) {
 		def ti = metadatas.get(t)
 		for (org.txm.metadatas.Entry e : ti) {
-			if ("text-order".equals(e.getId())) {
+			if ("text-order".equals(e.getId()) || "textorder".equals(e.getId())) {
 				String k = ""+t+".xml" // the sort test will use the xml-txm file names
 				textordersInfo[k] = e.value
 			}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy	(revision 3182)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImport.groovy	(revision 3183)
@@ -72,7 +72,7 @@
 		for (String t : metadata.keySet()) {
 			def ti = metadata.get(t)
 			for (org.txm.metadatas.Entry e : ti) {
-				if ("text-order".equals(e.getId())) {
+				if ("text-order".equals(e.getId()) || "textorder".equals(e.getId())) {
 					textorder[t] = e.getValue()
 				}
 			}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy	(revision 3182)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy	(revision 3183)
@@ -148,13 +148,14 @@
 	
 	private def closeMultiWriter() {
 		if (pagedWriter != null) {
-			def tags = pagedWriter.getTagStack()
+			def tags = []
+			tags.addAll(pagedWriter.getTagStack())
 			
-			//			println "STACK="+pagedWriter.getTagStack()
-			//			def stack = Thread.currentThread().getStackTrace();
-			//			int m = Math.min(15, stack.size()-1)
-			//			for (def s : stack[1..m]) println s
-			//			println "FILE ="+outfile
+			//println "CLOSING... STACK="+pagedWriter.getTagStack()
+			// def stack = Thread.currentThread().getStackTrace();
+			// int m = Math.min(15, stack.size()-1)
+			// for (def s : stack[1..m]) println s
+			// println "FILE ="+outfile
 			if (firstWord) { // there was no words
 				pagedWriter.writeCharacters("");
 				this.idxstart.add("w_0")
@@ -183,7 +184,7 @@
 			
 			pagedWriter.close();
 			
-			//			println "STACK TO REWRITE: $tags"
+			//println "STACK TO REWRITE: $tags"
 			int removedDiv = 0;
 			for (int i = 0 ; i < tags.size() ; i++) {
 				def tag = tags.remove(0)
@@ -194,7 +195,7 @@
 					if (removedDiv == 2) break; // remove elements until first "div" tag
 				}
 			}
-			//			println "STACK TO REWRITE2: $tags"
+			// println "STACK TO REWRITE2: $tags"
 			return tags;
 		} else {
 			return [];
@@ -238,6 +239,8 @@
 			pagedWriter.writeStartElement("div", ["class": pager.getImportModule().getProject().getName()]) //<div> of the corpus
 			pagedWriter.writeStartElement("div", ["class": "txmeditionpage"]) //<div>
 			
+			println "NEW HTML: "+outfile
+			println "TAGS: "+tags
 			pagedWriter.writeStartElements(tags)
 			return true;
 		} catch (Exception e) {
@@ -417,6 +420,8 @@
 							//case "l":
 								pagedWriter.writeEmptyElement("br", ["class":rend])
 								break;
+							case "ab":
+							case "body":
 							case "div":
 							case "div1":
 							case "div2":
@@ -518,7 +523,9 @@
 						break;
 					case XMLStreamConstants.END_ELEMENT:
 						localname = parser.getLocalName();
+						
 						if (currentOutOfTextElements.size() > 0) currentOutOfTextElements.pop()
+						
 						writeOutOfTextToEditText = currentOutOfTextElements.size() > 0
 					
 						if (localname == paginationElement) {
@@ -541,6 +548,9 @@
 								break;
 							case "lb":
 								break;
+							
+							case "ab":
+							case "body":
 							case "div":
 							case "div1":
 							case "div2":
