Index: TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy
===================================================================
--- TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy	(revision 4012)
+++ TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy	(revision 4013)
@@ -350,6 +350,7 @@
 			String noteContent = ""
 			String noteType = null
 			String rend = null
+			String style = null
 			String type = null
 			goToText();
 
@@ -360,6 +361,7 @@
 
 			for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) {
 				rend = "";
+				style = "";
 				type = "";
 				switch (event) {
 					case XMLStreamConstants.START_ELEMENT:
@@ -385,10 +387,11 @@
 
 						rend = getAttributeValue(parser, null, "rend")
 						if (rend == "") rend = null
+						style = getAttributeValue(parser, null, "style")
+						if (style == "") style = null
 						type = getAttributeValue(parser, null, "type")
 						if (type == "") type = null
-					//if (rend == null) rend = localname;
-
+						
 						switch (localname) {
 							case "text":
 								LinkedHashMap attributes = new LinkedHashMap();
@@ -435,8 +438,7 @@
 								pagedWriter.writeCharacters("\n")
 								break;
 							case "u":
-								pagedWriter.writeStartElement("span")
-								pagedWriter.writeAttribute("class", "sync")
+								pagedWriter.writeStartElement("span", ["class":"sync", "type":type, "style":style])
 								if (parser.getAttributeValue(null,"time") != null) {
 									pagedWriter.writeCharacters(parser.getAttributeValue(null,"time"))
 
@@ -444,26 +446,25 @@
 								}
 								break;
 							case "q":
-								pagedWriter.writeStartElement("q", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("q", ["class":rend, "type":type, "style":style])
 								break;
 							case "p":
 							//case "lg":
 								pagedWriter.write("\n")
 								if ("p".equals(type)) type = null;
-								pagedWriter.writeStartElement("p", ["class":rend, "type":type])
+								pagedWriter.writeStartElement("p", ["class":rend, "type":type, "style":style])
 								break;
 							case "ab":
 							case "l":
 							//case "lg":
 								pagedWriter.write("\n")
-								pagedWriter.writeStartElement("p", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("p", ["class":rend, "type":type, "style":style])
 								break;
 							case "sp":
-								pagedWriter.writeStartElement("p", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("p", ["class":rend, "type":type, "style":style])
 
 								if (parser.getAttributeValue(null,"speaker") != null) {
-									pagedWriter.writeStartElement("span")
-									pagedWriter.writeAttribute("class", "spk")
+									pagedWriter.writeStartElement("span", ["class":"spk"])
 									pagedWriter.writeCharacters(parser.getAttributeValue(null,"speaker")+": ")
 									pagedWriter.writeEndElement() // span@class=spk
 								}
@@ -471,11 +472,11 @@
 								break;
 							case "cb":
 								pagedWriter.write("\n")
-								pagedWriter.writeElement("span", ["class":"txmeditioncb", "align":"center"], getAttributeValue(parser, null,"n")) // element ignored in the END_ELEMENT event
+								pagedWriter.writeElement("span", ["class":"txmeditioncb", "align":"center", "type":type, "style":style], getAttributeValue(parser, null,"n")) // element ignored in the END_ELEMENT event
 								//pagedWriter.writeElement("span", ["class":rend, "type":type!=null?type:localname, "align":"center"], getAttributeValue(parser, null,"n")) // element ignored in the END_ELEMENT event
 								break;
 							case "lb":
-								pagedWriter.writeEmptyElement("br", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeEmptyElement("br", ["class":rend, "type":type, "style":style])
 								break;
 							case "body":
 							case "front":
@@ -485,66 +486,66 @@
 							case "div3":
 							case "div4":
 							case "div5":
-								pagedWriter.writeStartElement("div", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("div", ["class":rend, "type":type, "style":style])
 								pagedWriter.write("\n");
 								break;
 							case "div":
-								pagedWriter.writeStartElement("div", ["class":rend, "type":type])
+								pagedWriter.writeStartElement("div", ["class":rend, "type":type, "style":style])
 								pagedWriter.write("\n");
 								break;
 							case "head":
 								pagedWriter.write("\n")
-								pagedWriter.writeStartElement("h2", ["class":rend, "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("h2", ["class":rend, "type":type, "style":style])
 								break;
 							case "graphic":
 								pagedWriter.write("\n");
 								String url = getAttributeValue(parser, null, "url")
 								if (url != null) {
 									// TEI <graphic rend="left-image" url="image.png"/> -> <center class="left-image"><img href="image.png"/></center> + <moncorpus>.css avec rule ".left-image"
-									pagedWriter.writeStartElement("center", ["class":rend, "type":type!=null?type:localname]) // css -> .<rend> { ... } styles OR
+									pagedWriter.writeStartElement("center", ["class":rend, "type":type, "style":style]) // css -> .<rend> { ... } styles OR
 									pagedWriter.writeEmptyElement("img", ["src":url, "align":"middle"])
 									pagedWriter.writeEndElement() // center
 								}
 								break;
 							case "list":
 								if ("unordered" == rend || "bulleted" == rend) {
-									pagedWriter.writeStartElement("ul", ["class":rend])
+									pagedWriter.writeStartElement("ul", ["class":rend, "type":type, "style":style])
 								} else if ("ordered" == rend || "numbered" == rend) {
-									pagedWriter.writeStartElement("ol", ["class":rend, "type":type!=null?type:localname])
+									pagedWriter.writeStartElement("ol", ["class":rend, "type":type, "style":style])
 								} else {
-									pagedWriter.writeStartElement("ul", ["class":rend, "type":type!=null?type:localname])
+									pagedWriter.writeStartElement("ul", ["class":rend, "type":type, "style":style])
 								}
 								break
 							case "item":
-								pagedWriter.writeStartElement("li", ["class":rend])
+								pagedWriter.writeStartElement("li", ["class":rend, "type":type, "style":style])
 								break;
 							case "del":
-								pagedWriter.writeStartElement("del", ["class":rend])
+								pagedWriter.writeStartElement("del", ["class":rend, "type":type, "style":style])
 								pagedWriter.write("\n");
 								break;
 							case "hi":
 							case "emph":
 								if ("i".equals(rend) || "italic".equals(rend)) {
-									pagedWriter.writeStartElement("i", ["class":rend])
+									pagedWriter.writeStartElement("i", ["class":rend, "type":type, "style":style])
 								} else if ("b".equals(rend) || "bold".equals(rend)) {
-									pagedWriter.writeStartElement("b", ["class":rend])
+									pagedWriter.writeStartElement("b", ["class":rend, "type":type, "style":style])
 								} else {
 									if ("emph".equals(localname)) {
-										pagedWriter.writeStartElement("i", ["class":rend])
+										pagedWriter.writeStartElement("i", ["class":rend, "type":type, "style":style])
 									} else { // hi
-										pagedWriter.writeStartElement("b", ["class":rend])
+										pagedWriter.writeStartElement("b", ["class":rend, "type":type, "style":style])
 									}
 								}
 								break;
 							case "table":
-								pagedWriter.writeStartElement("table", ["class":rend])
+								pagedWriter.writeStartElement("table", ["class":rend, "type":type, "style":style])
 								pagedWriter.write("\n");
 								break;
 							case "row":
-								pagedWriter.writeStartElement("tr", ["class":rend])
+								pagedWriter.writeStartElement("tr", ["class":rend, "type":type, "style":style])
 								break;
 							case "cell":
-								pagedWriter.writeStartElement("td", ["class":rend])
+								pagedWriter.writeStartElement("td", ["class":rend, "type":type, "style":style])
 								String rows = getAttributeValue(parser, null, "rows")
 								if (rows != null && rows.length() > 0) {
 									pagedWriter.writeAttribute("rowspan", rows)
@@ -555,7 +556,7 @@
 								}
 								break;
 							case "ref":
-								pagedWriter.writeStartElement("a", ["href":getAttributeValue(parser, null, "target"), "class":rend, "target": "_blank", "type":type!=null?type:localname])
+								pagedWriter.writeStartElement("a", ["href":getAttributeValue(parser, null, "target"), "class":rend, "target": "_blank", "type":type, "style":style])
 								break;
 							case "form":
 								wordvalue=""
@@ -591,7 +592,7 @@
 									noteContent = ""
 									noteType = type
 								} else if (allTags && !flagW && localname != paginationElement) {
-									pagedWriter.writeStartElement("span", ["class":localname])
+									pagedWriter.writeStartElement("span", ["class":localname, "type":type, "style":style])
 								} else if (ignoreUnmanagedTags && !flagW && localname != paginationElement) {
 									// do nothing
 								} else {
