I realize this is an old thread, but did this issue ever have a resolution? I'm seeing essentially the same behavior in 1.4.3p1. I have element nodes with a namespace I want to save to file, but I want to reorganize the namespace names so I don't get ns1, ns2, etc.