Lightweight template engine

Written by Walter

Just bumped into this @ work (template engine bug on an embedded device).
Remembering the baseml template engine we wrote way back in early 2001-2002 BaseML.
Turns out it still compiles (apart from some using namespace std's missing).

Download the fixed sources here (ow yes commented out some procbuf.h code used only when you have php stuff, but this could be replaced with popen on os x/darwin)

OS X binary here: baseml
Alpha sources (well all works except the php stuff which you normally don't use on an embedded device): baseml-0.4a.tar.gz

Original 2002 sources here

Basically with this template language you can define functions with parameters in xml and call them. With the baseml executable you can create static html files from it.

Little example:

Walter-Schrepperss-MacBook-Pro:baseml-0.4a wschrep$ cat hello.bml
<?xml version="1.0"?>






Walter-Schrepperss-MacBook-Pro:baseml-0.4a wschrep$ baseml/baseml hello.bml
<!-- Generated with BaseML v0.3 -->
Hello World!

<!-- Generated in 0 (virtual) seconds -->

There is a load of documentation and tutorials here on the wayback machine:
baseml tutorial


Back to archive