Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/importer/limsi/importer.groovy

importer.groovy (revision 479)
125 125
			cpb.tick();
126 126

  
127 127
			String filename = infile.getName();
128
			int idx = filename.indexOf(".");
128
			int idx = filename.lastIndexOf(".");
129 129
			if (idx > 0) filename = filename.substring(0, idx)
130 130

  
131 131
			File outfile = new File(txmDir, filename+".wtc")
......
155 155
		//inject metadata into
156 156
		this.infile = infile;
157 157
		this.outfile = outfile;
158
		def builder = DocumentBuilderFactory.newInstance().newDocumentBuilder()
158
		def factory = DocumentBuilderFactory.newInstance()
159
		factory.setXIncludeAware(true);
160
		def builder = factory.newDocumentBuilder()
161
		
159 162
		doc = builder.parse(infile)
160 163
		insert(trans.get("trans"), metas);
161 164
		return save();

Also available in: Unified diff