Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/sw/ReplaceXmlDomNode.groovy

ReplaceXmlDomNode.groovy (revision 479)
37 37
import javax.xml.xpath.*;
38 38

  
39 39
import org.txm.sw.ReplaceXmlDomNode;
40
import org.txm.importer.PersonalNamespaceContext;
40
import org.txm.importer.graal.PersonalNamespaceContext;
41 41
import javax.xml.namespace.NamespaceContext;
42 42
import javax.xml.transform.*;
43 43
import javax.xml.transform.dom.DOMSource;
......
63 63
	 */
64 64
	public ReplaceXmlDomNode(File src, File target, String xpathsrc, String xpathtarget)
65 65
	{
66
		def builder = DocumentBuilderFactory.newInstance().newDocumentBuilder()
66
		def factory = DocumentBuilderFactory.newInstance();
67
		factory.setXIncludeAware(true)
68
		def builder = factory.newDocumentBuilder()
67 69
		
68 70
		def docsrc = builder.parse(src);
69 71
		def doctarget = builder.parse(target);
......
71 73
		Node srcnode = null;
72 74
		Node targetnode = null;
73 75
		
74
		XPathFactory factory = XPathFactory.newInstance();
76
		factory = XPathFactory.newInstance();
75 77
		XPath XpathObj = factory.newXPath();
76 78
		XpathObj.setNamespaceContext(nsContext);
77 79
		

Also available in: Unified diff