Fix issue #2: Namespace is prepended two times
Fix issue #1: Remove declare(encoding="UTF-8") calls