package mir.util;
import java.util.List;
-import java.io.*;
import mir.generator.Generator;
import mir.generator.GeneratorExc;
};
}
+ public static class prettyEncodeHTMLGeneratorFunction implements Generator.GeneratorFunction {
+ public Object perform(List aParameters) throws GeneratorExc {
+ try {
+ if (aParameters.size()!=1)
+ throw new GeneratorExc("prettyEncodeHTMLGeneratorFunction: only 1 parameter expected");
+
+ return HTMLRoutines.prettyEncodeHTML(StringRoutines.interpretAsString(aParameters.get(0)));
+ }
+ catch (GeneratorExc e) {
+ throw e;
+ }
+ catch (Throwable t) {
+ throw new GeneratorFailure("prettyEncodeHTMLGeneratorFunction: " + t.getMessage(), t);
+ }
+ };
+ }
+
public static class encodeXMLGeneratorFunction implements Generator.GeneratorFunction {
public Object perform(List aParameters) throws GeneratorExc {
try {