Révision 3220

tmp/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/WordProperty2WordMacro.groovy (revision 3220)
74 74
	
75 75
	XMLProcessor xp = new XMLProcessor(orig);
76 76
	LocalNameHookActivator activator = new LocalNameHookActivator("w")
77

  
78
	nWords = 0
77 79
	new DOMIdentityHook("word", activator, xp) {
78 80
		@Override
79 81
		public void processDom() {
......
98 100
					form.setTextContent(anatype.text())
99 101
					anatype['@type'] = "#form"
100 102
					anatype.setTextContent(s)
103
					nWords++
101 104
				} else {
102 105
					dom = null
103 106
				}
......
105 108
		}
106 109
	}
107 110
	xp.process(result)
111

  
112
	if (nWords == 0) {
113
		println "Removing empty <text>: $text"
114
		text.delete()
115
	}
108 116
}
tmp/org.txm.groovy.core/src/groovy/org/txm/macro/table/Table2XMLMacro.groovy (revision 3220)
223 223
		if (debug) println "Processing text: $id"
224 224
		
225 225
		if (toWrite.size() <= 1 && textContentColumnList.size() == 0) {
226
			println "Removing empty <text>: $id"
226
			cpb.setMessage("Removing empty <text>: $id")
227 227
			continue
228 228
		}
229 229
		

Formats disponibles : Unified diff