A template is a text marked-up with special tags that contain expressions. Template evaluation replaces tags with the evaluation of such expressions, w.r.t. a substitution of parameters.
Tags must have the form {{Expr}}, where Expr is a parameter name.
Example: given the file n.txt.skel:
Dear {{Author}}, on behalf of the program committee of {{Conf}}, we are pleased to inform you that your paper {{Title}} has been accepted for inclusion in the post-conference proceedings.
then the query:
?- eval_template_file('n.txt.skel', [ 'Author' = 'Alain', 'Title' = 'The Birth of Prolog', 'Conf' = 'CACM 93' ], 'n.txt').
produces the following text:
Dear Alain, on behalf of the program committee of CACM 93, we are pleased to inform you that your paper The Birth of Prolog has been accepted for inclusion in the post-conference proceedings.
Usage:eval_template_string(In,Subst,Out)
Evaluate the template string In to generate Out using the values in Subst.