Template processor
A template processor (also known as a template engine or template parser) is software designed to combine one or more templates with a data model to produce one or more result documents. The language that the templates are written in is known as a template language or templating language. For purposes of this article, a result document is any kind of formatted output, including documents, web pages, or source code (in source code generation), either in whole or in fragments. A template engine is ordinarily included as a part of a web template system or application framework, and may be used also as preprocessor or filter.
Typical features
Template engines typically include features common to most high-level programming languages, with an emphasis on features for processing plain text.
Such features include:
variables and functions
text replacement
file inclusion (or transclusion)
conditional evaluation and loops
Embedded template engines
While template processors are typically a separate piece of software, used as part of a system or framework, simple templating languages are commonly included in the string processing features of general-purpose programming languages, and in text processing programs, notably text editors or word processors. The templating languages are generally simple substitution-only languages, in contrast to the more sophisticated facilities in full-blown template processors, but may contain some logic.