01: package gnu.kawa.xml;
02:
03: import gnu.mapping.*;
04: import gnu.expr.*;
05: import gnu.lists.UnescapedData;
06:
07: public class MakeUnescapedData extends Procedure1 implements CanInline {
08: public static final MakeUnescapedData unescapedData = new MakeUnescapedData();
09:
10: public Object apply1(Object arg) {
11: return new UnescapedData(arg == null ? "" : arg.toString());
12: }
13:
14: public Expression inline(ApplyExp exp, ExpWalker walker) {
15: Expression[] args = exp.getArgs();
16: if (args.length == 1 && args[0] instanceof QuoteExp)
17: return new QuoteExp(apply1(((QuoteExp) args[0]).getValue()));
18: return exp;
19: }
20: }
|