Don't create empty text nodes
Compare the generated Document against the standard library
Refactored
Namespaces of attributes, wip