Hi,
playing with templates and extensions I'am not happy that template variables between the extension tags are not expanded because in Parser.php replaceVariables() is called _after_ strip().
Don't know if this is a design decision, but as a result of that you can't have parametrized templates which uses extensions which is quite bad.
For example a "Template:Inventarnummer" which is: <db>SELECT inventarnum FROM rechner WHERE name = '{{{1}}}'</db> can't be used as {{Inventarnummer|Hermes}} because the "db" extension gets the variable literally as "{{{1}}}" not as "Hermes". This way it's impossible to hide "extensions calls" inside templates.
Don't know if this is generally useful at all but the attached patch of Parser.php (against current cvs) works for me quite ok.
Mikesch