TinyTemplate is a small single-file templating engine in Java. A PHP version is also available.
Templates can access the available variables and nested fields/values, format the values dependent on the locale. Conditional statements and loops are also supported.