Révision 3218

tmp/org.txm.groovy.core/src/groovy/org/txm/macro/table/Table2XMLMacro.groovy (revision 3218)
36 36
@Field @Option(name="structuresSeparator", usage="Structures", widget="Separator", required=false, def="Structures")
37 37
		def structuresSeparator
38 38

  
39
@Field @Option(name="teiStructures", usage="check to create tei:ab@type elements for each structure", widget="String", required=false, def="false")
40
		def teiStructures;
41

  
39 42
@Field @Option(name="structureTag", usage="structure element to create", widget="String", required=false, def="div")
40 43
		def structureTag;
41 44

  
......
349 352

  
350 353
def writeListTextContent(def record, def att, def writer) {
351 354
	
352
	writer.writeStartElement("ab")
353
	writer.writeAttribute("type", att)
355
	if (teiStructures) {
356
		writer.writeStartElement("ab")
357
		writer.writeAttribute("type", att)
358
	} else {
359
		writer.writeStartElement(AsciiUtils.buildAttributeId(att));
360
	}
354 361
	writer.writeCharacters("\n")
355 362
	
356 363
	writer.writeStartElement("head")
......
408 415

  
409 416
def writeTextContent(def record, def att, def writer) {
410 417
	
411
	writer.writeStartElement("ab")
412
	writer.writeAttribute("type", att)
418
	if (teiStructures) {
419
		writer.writeStartElement("ab")
420
		writer.writeAttribute("type", att)
421
	} else {
422
		writer.writeStartElement(AsciiUtils.buildAttributeId(att));
423
	}
413 424
	writer.writeCharacters("\n")
414 425
	
415 426
	writer.writeStartElement("head")
......
434 445

  
435 446
def writePrefixTextContent(def record, def att, def writer) {
436 447
	
437
	writer.writeStartElement("ab")
438
	writer.writeAttribute("type", att)
448
	if (teiStructures) {
449
		writer.writeStartElement("ab")
450
		writer.writeAttribute("type", att)
451
	} else {
452
		writer.writeStartElement(AsciiUtils.buildAttributeId(att));
453
	}
439 454
	writer.writeCharacters("\n")
440 455
	
441 456
	writer.writeStartElement("head")
......
504 519
 String name = inputFile.getName()
505 520
 int idx = name.lastIndexOf(".")
506 521
 if (idx > 0) name = name.substring(0, idx)
507
 */
522
 */

Formats disponibles : Unified diff