public TemplateFactory init() {
if(config == null)
throw new IllegalArgumentException("template config is null");
long start = System.currentTimeMillis();
FunctionRegistry.add("dateFormat", new DateFormatFunction(config.getCharset()));
FunctionRegistry.add("len", new LengthFunction(config.getCharset()));
FunctionRegistry.add("increment", new AutoincrementFunction(config.getCharset()));
FunctionRegistry.add("cut", new CutStringFunction(config.getCharset()));
FunctionRegistry.add("escape", new XmlEscapeFunction(config.getCharset()));
FunctionRegistry.add("remove", new RemoveAttributeFunction());