Like many template systems, the template string is compiled into a program, and then it can be expanded any number of times. For example, in a web app, you can compile the templates once at server startup, and use the expand() method at request handling time. expand() uses the compiled representation.
There are various options for controlling parsing — see {@link TemplateCompiler} and {@link TemplateCompileOptions} Don't go crazywith metacharacters. {}, [], {{}} or <> should cover nearly any circumstance, e.g. generating HTML, CSS XML, JavaScript, C programs, text files, etc.
|
|