The Electric Template Language (commonly referred to as ETL) is a minimalist templating system implemented on top of APR and APR-Util. It's designed to provide a lightweight template solution that fits easily into an Apache HTTP Server module or other APR based program. It also makes a pretty good stand alone templating system for static HTML pages; for example, this web site is written using ETL templates.
ETL is made available under the Apache Software License, Version 2.0, which means it is suitable for use in both open and closed source software, and that you can make modifications to it without being required to distribute them, as long as you abide by the terms set forth in the license. Although, if you do fix bugs or add new features it would certainly be nice if you contributed them back, as described in the development page.
The template language looks like this:
<html>
<head>
<title>[%= title | html %]</title>
</head>
<body>
[% if add_header %]<hr/>[% end %]
<h1>[%= title | html %]</h1>
<ul>
[% for e in elements %]
<li>[%= e | html %]</li>
[% end %]
</ul>
[% if add_footer %]<hr/>[% end %]
</body>
</html>
That template is parsed and then is executed along with a set of variables and produces about what you'd expect. For more info on the ETL language, please see it's page in the documentation.
There is also a Data Definition Language (referred to as DDL for brevity) which can be used to generate the variables that are passed to an ETL template. DDL gives you a way to easily create Strings, Integers, Hashes, and Arrays without having to do it in code.
A DDL file for the previous example might look like this:
title = "An example template" add_footer = 1 add_header = 1 elements = [ "foo", "bar", "baz" ]
DDL is discussed in more detail in the documentation.
ETL provides a C language API for parsing templates and DDL files, generating variables, and executing the results to produce textual output. This API is documented via Doxygen comments in its header files, and the resulting documentation is available here.
If you've ever used Template Toolkit, EZT, or Clearsilver you'll probably find many of the concepts in ETL to be similar, although the feature set is somewhat stripped down, so if you find yourself trying to do a whole lot of work in your template it's a sign that you either need to put that logic in your program's code or find a different template engine. ETL strives for simplicity and easy of integration with your program's logic, and does so while providing easy to read templates that are a joy to work with.