Support XML namespaces

Closes #19.
Add support for Smarty (PHP template engine)