Lisp Code Generator 
At the March Vancouver Lisp users’ group, Coby Beck gave a very interesting and impressive
demonstration of his Lisp code-generation system. (Unfortunately the sound quality is really horrible.) His model format is just Lisp code and his output is SQL, SQL stored procedures, and Python scripts. It makes sense when you consider that nobody has more experience with code generation than the Lisp community. One thing I did wonder about though was why he didn’t just generate Lisp code and run it directly rather than bothering with Python?
One of the unusual things about the system is that he actually has the stored procedures generating all of the HTML and Javascript for a page. He admits that he doesn’t know if this idea is genius or madness (I vote for madness).
Another interesting part of his system is how he expresses business rules in an abstract syntax trees and then "unparses" them into the underlying language that he requires: ie. SQL, Javascript, Python, etc. This is similar to what Microsoft does with their
LINQ Project.
Anyway, the reason that I mention this is that I’ve done a lot of XML and XSLT code generators and I really find XSLT to be unsuitable for this sort of thing. If I were to create a new code-generation system I would certainly try using a high-level language (something like Scheme, Lua, Smalltalk, Ruby, etc.) rather than using XML and XSLT again. I've always been curious about how well Prolog would work for this purpose.
With Java it might be a good idea to build the code-generator into your ClassLoader and skip the conventional generate-compile-load cycle altogether.