Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/misc/EuroPress2XMLMacro.groovy

EuroPress2XMLMacro.groovy (revision 479)
1 1
package org.txm.macro.misc
2 2
// STANDARD DECLARATIONS
3 3

  
4
import groovy.transform.Field
5 4
import groovy.xml.QName
6

  
7 5
import java.text.DecimalFormat
8

  
6
import org.txm.utils.xml.DomUtils;
7
import org.txm.importer.ValidateXml;
8
import org.w3c.tidy.Tidy
9
import groovy.util.XmlParser
9 10
import org.kohsuke.args4j.*
10
import org.txm.importer.ValidateXml
11
import org.txm.rcp.swt.widget.parameters.*
12
import org.w3c.tidy.Tidy
11
import groovy.transform.Field
12
import org.txm.rcpapplication.swt.widget.parameters.*
13 13

  
14 14
// BEGINNING OF PARAMETERS
15 15
@Field @Option(name="rootDir", usage="The directory contains the 'orig' directory which contains the html files", widget="Folder", required=false, def="/path")
......
93 93
	}
94 94
	
95 95
	String name = htmlFile.getName()
96
	name = name.substring(0, name.indexOf("."));
96
	name = name.substring(0, name.lastIndexOf("."));
97 97

  
98 98
	File xhtmlFile = new File(outDir, name+".xhtml")
99 99

  

Also available in: Unified diff