HTML-TEMPLATE

HTML-TEMPLATE is an HTML template library to use templates much like Perl's HTML::Template. Despite of its name, HTML-TEMPLATE is HTML-agnostic and could be used for templating other documents.

It was written by Edi Weitz and can be found at http://weitz.de/html-template/.

Download ASDF package from http://weitz.de/files/html-template.tar.gz

Jörg Höhle also liked the idea of a clear and complete separation between HTML (written by designers) and code. He came up with a variant of Edi's approach to HTML template. It uses Edi's parsing code (thanks!), no more, but the programmer view on it feels very different.

Consider Edi's 7x7 chess board example on his documentation page and how my code would look like:

(setq my-template
 ;; load and check against specification
 (tmpl-load "file.html" '((LOOP rows (LOOP cols colorful-style content)))))

(let ((counter 0)) (tmpl-print my-template (lambda (rowprinter) (loop repeat 7 do (funcall rowprinter (lambda (cellprinter) (loop repeat 7 do (funcall cellprinter (oddp counter) (format nil "~R" counter)) (incf counter))))))))

Jörg Höhle's design goals:

[This next section confuses me a bit. I think a list entry refers to Edi's version, but I can't really tell.[ Some differences between Edi and Jörg's work include:

My experience:


This page is linked from: CL-EMB   cl-html-template   Jörg Höhle   YHTML-TEMPLATE  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively