RFC: template engine [ was: Re: Implementing tables - advice wanted ]

Michal Slaski <>
Sat Jun 17 12:26:32 CEST 2006


Gaspar Chilingarov wrote:
> I would like to listen any suggestions on templating solution, which you
> would like to see

We use a concept of xml tags that can be included in xhtml pages. The
tag can be translated into:
1. Call to a call-back function implemented in erlang module - since
parameters and body of the tag are passed as arguments to the
call-back function, it is easy to develop patterns like branching
constructions, list processing or even execution of erlang code
included in xhtml page (however we hardly mix erlang and xhtml code).

2. Block of code that can be extracted and used for inclusion in other
blocks, so it is possible to gather all templates used to format data
of same kind in one file. A block can be then included either by
erlang or by dedicated xml tag.

A platform implementing this concept has been built on top of yaws and
is described in a paper submitted to the Erlang Workshop 2006.


-- 
Michal Slaski
www.erlang-consulting.com



More information about the erlang-questions mailing list