A DOM based templating engine