import java.util.List;
import java.util.Map;
+import gnu.regexp.RE;
+
import mir.config.MirPropertiesConfiguration;
import mir.entity.adapter.EntityAdapter;
import mir.entity.adapter.EntityIteratorAdapter;
public class MirBasicProducerAssistantLocalizer implements MirProducerAssistantLocalizer {
protected LoggerWrapper logger;
+ private RE regularExpressionLT;
+ private RE regularExpressionGT;
+
+ public MirBasicProducerAssistantLocalizer() throws MirLocalizerExc, MirLocalizerFailure {
+ try{
+ regularExpressionLT = new RE("<");
+ regularExpressionGT = new RE(">");
+ }
+ catch (Throwable t) {
+ throw new MirLocalizerFailure(t);
+ }
+ }
+
public void initializeGenerationValueSet(Map aValueSet) throws MirLocalizerExc, MirLocalizerFailure {
try {
Iterator i;
break;
case Node.TEXT_NODE:
- out.write(node.getNodeValue());
+ String value=node.getNodeValue();
+ try{
+ value=regularExpressionLT.substituteAll(value, "<");
+ value=regularExpressionGT.substituteAll(value, ">");
+ }
+ catch (Throwable t){
+ value="";
+ }
+ logger.error("TN"+value);
+
+ out.write(value);
+
break;
}