Révision 2020

tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZPager.groovy (revision 2020)
279 279
			xslParams["number-words-per-page"] = Integer.parseInt(s);
280 280
			xslParams["pagination-element"] = project.getEditionDefinition("default").getPageElement();
281 281
			xslParams["import-xml-path"] = project.getProjectDirectory()
282
			println "XSL PARAMS: "+xslParams
282
			//println "XSL PARAMS: "+xslParams
283 283

  
284 284
			def xslFiles = xslDirectory.listFiles()
285 285
			xslFiles = xslFiles.sort() { f -> 
......
378 378

  
379 379
					getFirstWordIDs(textName, editionName, newEditionDirectory, xslFile, txmFile);
380 380
				}
381
				
382
				def editionDeclaration = project.getEditionDefinition(editionName); // create the edition definition
383
				editionDeclaration.setBuildEdition(true)
384
				editionDeclaration.setPageBreakTag(project.getEditionDefinition("default").getPageElement())
385
				editionDeclaration.setWordsPerPage(project.getEditionDefinition("default").getWordsPerPage())
381 386
			}
382 387
			println ""
383 388
		}
tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 2020)
180 180
	}
181 181

  
182 182
	/**
183
	 * Initializes the toolbox with the parameters read in the file
183
	 * Initializes the Toolbox with the parameters read in the file
184 184
	 * textometrie.properties found in the user home directory
185 185
	 *
186 186
	 * @return true, if successful
tmp/org.txm.core/src/java/org/txm/objects/EditionDefinition.java (revision 2020)
16 16
	public EditionDefinition(Project project, String name) {
17 17
		this.node = project.getPreferencesScope().getNode(EditionDefinition.class.getSimpleName()).node(name);
18 18
		setName(name); //TODO use node.name() instead
19
		
20 19
	}
21 20
	
22 21
	public void delete() {
tmp/org.txm.core/src/java/org/txm/importer/ApplyXsl2.java (revision 2020)
268 268
	 * Process files without xslt args.
269 269
	 *
270 270
	 * @param xmlinfile the xmlinfile
271
	 * @param xmloutfile the xmloutfile
271
	 * @param xmloutfile the xmloutfile. If not set, xmlinfile content is replaced
272 272
	 * @return true, if successful
273 273
	 * @throws TransformerException 
274 274
	 * @throws IOException 
......
304 304
		transformer.transform(new StreamSource(xmlinfile), out);
305 305

  
306 306
		// then write the result in the result file
307
		if (xmloutfile != null) {
307
		if (xmloutfile == null) {
308
			xmloutfile = xmlinfile;
309
		}
310
		
308 311
			BufferedWriter w = new BufferedWriter(new FileWriter(xmloutfile));
309 312
			w.write(strWriter.toString());
310 313
//			System.out.println("DEBUG: "+xmloutfile);
......
322 325
//					System.out.println("Warning: no diff between "+inputfile_copy+" and "+ xmloutfile);
323 326
//				}
324 327
//			}
325
		}
328
		
326 329

  
327 330
		cleanMemory();
328 331
		return true;

Formats disponibles : Unified diff