If you're using XSLT, you really want to use the Level 2 DOM, and
specifically the namespace-aware factory methods createElementNS() and
createAttributeNS()/setAttributeNS rather than the old createElement and
createAttribute/setAttributes calls. Failing to do so will yield a DOM that
does not support namespace-based operations.
You should probably also cut over to using the official
DOMImplementation.createDocument() method (which is also namespace-aware,
and which creates the root element at the same time that it creates the
document).
(We've considered adding support for Level 1 DOMs at some point in the
future. Basically, we'd have to write an expanded version of DOM2DTM which
understands how to evaluate and simulate all the namespace bindings. Could
be done... but since most folks _SHOULD_ be upgrading their DOM code to
Level 2 in any case it hasn't been a top priority.)