Ok, so after thinking about it for over a month I sat today and started coding what I wanted to be a Mootools based version of Jaml. And here it is: http://github.com/eneko/mooml/blob/master/mooml/mooml.js
Thanks to Mootools, the code is very clean and concise. May have room for more improvements. I couldn't find a way to get rid of the with/eval convination but at least I can guarantee it's only processed once when the template is rendered (same for Jaml, just I had doubts about how this part worked before). The usage is the same as Jaml, but instead of returning HTML code as a string, it builds the actual dom elements with Mootools. This makes it easier to use, without the need of Elements.from. It may return an array of elements if our template has multiple roots, or a single element if there is only one root. Also, since it creates dom elements now, we can pass not only attributes to the template, but also styles and events, same as we can do on the Mootools Element.set method. Please, let me know what you think. Hope it's useful :)
