Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/edition/FacsEditionBuilderMacro.groovy

FacsEditionBuilderMacro.groovy (revision 479)
2 2

  
3 3
// STANDARD DECLARATIONS
4 4

  
5
import org.kohsuke.args4j.*
5 6
import groovy.transform.Field
6

  
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
7
import org.txm.rcpapplication.swt.widget.parameters.*
14 8
import org.txm.objects.*
15
import org.txm.rcp.commands.*
16
import org.txm.rcp.swt.widget.parameters.*
17
import org.txm.searchengine.cqp.corpus.*
9
import org.txm.searchengine.cqp.corpus.*;
10
import org.w3c.dom.*
18 11
import org.txm.utils.xml.DomUtils
19
import org.w3c.dom.*
12
import org.txm.Toolbox
20 13

  
14
import org.w3c.dom.Document;
15
import org.xml.sax.SAXException;
16
import org.txm.rcpapplication.commands.*
17
import javax.xml.parsers.*;
18
import javax.xml.transform.*;
19
import javax.xml.transform.dom.DOMSource;
20
import javax.xml.transform.stream.StreamResult;
21 21

  
22

  
22 23
try { println "ARGS=$args";} catch(Exception e) {args = [:]}
23 24

  
24 25
def corpus = null
......
126 127
for (def xmlFile : workDirectory.listFiles()) {
127 128
	if (xmlFile.isHidden() || xmlFile.isDirectory()) continue // ignore
128 129
	String txtname = xmlFile.getName()
129
	int idx = txtname.indexOf(".")
130
	int idx = txtname.lastIndexOf(".")
130 131
	if (idx > 0) txtname = txtname.substring(0,idx)
131 132

  
132 133
	// create a page per "pb" element found in the xml-txm file

Also available in: Unified diff