Révision 3812
TXM/trunk/bundles/org.txm.core/src/java/org/txm/utils/NameSpaceXmlNodePrinter.java (revision 3812) | ||
---|---|---|
24 | 24 |
import java.util.List; |
25 | 25 |
import java.util.Map; |
26 | 26 |
|
27 |
import javax.xml.namespace.QName;
|
|
27 |
import groovy.namespace.QName;
|
|
28 | 28 |
|
29 | 29 |
/** |
30 | 30 |
* Prints a <code>groovy.util.Node</code> (as used with <code>XmlParser</code>) including all children in XML format. |
... | ... | |
361 | 361 |
} |
362 | 362 |
|
363 | 363 |
private String getName(Object object) { |
364 |
String ret = null; |
|
364 | 365 |
if (object instanceof String) { |
365 |
return (String) object;
|
|
366 |
ret = (String) object;
|
|
366 | 367 |
} else if (object instanceof QName) { |
367 | 368 |
QName qname = (QName) object; |
368 | 369 |
if (!namespaceAware) { |
369 |
return qname.getLocalPart(); |
|
370 |
ret = qname.getLocalPart(); |
|
371 |
} else { |
|
372 |
ret = qname.getPrefix()+":"+qname.getLocalPart(); |
|
370 | 373 |
} |
371 |
return qname.getNamespaceURI(); |
|
372 | 374 |
} else if (object instanceof Node) { |
373 | 375 |
Object name = ((Node) object).name(); |
374 | 376 |
return getName(name); |
377 |
} else { |
|
378 |
ret = object.toString(); |
|
375 | 379 |
} |
376 |
return object.toString(); |
|
380 |
|
|
381 |
// System.out.println("getName("+object.getClass()+"-"+object+"): "+ret); |
|
382 |
return ret; |
|
377 | 383 |
} |
378 | 384 |
|
379 | 385 |
private void printSimpleItemWithIndent(Object value) { |
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/doc/FixBreaksAndAutomaticStyles.groovy (revision 3812) | ||
---|---|---|
74 | 74 |
namespaceContext.registerNamespacePrefix("field", "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"); |
75 | 75 |
namespaceContext.registerNamespacePrefix("formx", "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"); |
76 | 76 |
namespaceContext.registerNamespacePrefix("css3t", "http://www.w3.org/TR/css3-text/"); |
77 |
namespaceContext.registerNamespacePrefix("tei", "http://www.tei-c.org/ns/1.0"); |
|
77 | 78 |
|
78 | 79 |
printer.setNamespaceAware(true); |
79 | 80 |
printer.print(root, namespaceContext) |
TXM/trunk/bundles/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/doc/docLoader.groovy (revision 3812) | ||
---|---|---|
121 | 121 |
return; |
122 | 122 |
} |
123 | 123 |
println "" |
124 |
|
|
124 |
return; |
|
125 | 125 |
// move data folders and build css file |
126 | 126 |
if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); } |
127 | 127 |
if (MONITOR != null) MONITOR.worked(20, "RETRIEVE STYLES") |
Formats disponibles : Unified diff