yet another attempt to tame the chameleon. fixes #102

previous workaround modified the parsing process to
resolve QName and treated unbound namespace as the outer one.
this trick does not work when a particular file
is imported more than once to different namespaces.
this time around, I am rewriting the file content and
reparsing it.