Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macroproto/edition/XTZEditionBuilderMacro.groovy

XTZEditionBuilderMacro.groovy (revision 479)
2 2

  
3 3
// STANDARD DECLARATIONS
4 4

  
5
import org.kohsuke.args4j.*
6

  
5 7
import groovy.transform.Field
6 8

  
7
import javax.xml.parsers.*
8
import javax.xml.transform.*
9
import javax.xml.transform.dom.DOMSource
10
import javax.xml.transform.stream.StreamResult
11

  
12
import org.kohsuke.args4j.*
13
import org.txm.Toolbox
14
import org.txm.macro.edition.BuildFacsEditions
15
import org.txm.macro.edition.RemoveTag
9
import org.txm.rcpapplication.swt.widget.parameters.*
10
import org.txm.macro.edition.BuildFacsEditions;
11
import org.txm.macro.edition.RemoveTag;
16 12
import org.txm.objects.*
17
import org.txm.rcp.commands.*
18
import org.txm.rcp.swt.widget.parameters.*
19
import org.txm.searchengine.cqp.corpus.*
13
import org.txm.searchengine.cqp.corpus.*;
20 14
import org.w3c.dom.*
15
import org.txm.utils.xml.DomUtils
16
import org.txm.Toolbox
21 17

  
18
import org.w3c.dom.Document;
19
import org.xml.sax.SAXException;
20
import org.txm.rcpapplication.commands.*
21

  
22
import javax.xml.parsers.*;
23
import javax.xml.transform.*;
24
import javax.xml.transform.dom.DOMSource;
25
import javax.xml.transform.stream.StreamResult;
26

  
22 27
println "Corpus view selection is: "+corpusViewSelection
23 28
if (!(corpusViewSelection instanceof MainCorpus)) {
24 29
	println "This marcro works with a MainCorpus selection. Aborting"
......
90 95
for (def xmlFile : workDirectory.listFiles()) {
91 96
	if (xmlFile.isHidden() || xmlFile.isDirectory()) continue // ignore
92 97
	String txtname = xmlFile.getName()
93
	int idx = txtname.indexOf(".")
98
	int idx = txtname.lastIndexOf(".")
94 99
	if (idx > 0) txtname = txtname.substring(0,idx)
95 100

  
96 101
	println " Build HTML pages of text=$txtname"

Also available in: Unified diff