The code is currently preserving the xmlns:xml namespace declaration when it's set to the default value. This tends to cause a lot of signature interop issues because it's a subtle c14n point that it shouldn't be serialized, and has been a source of bugs in both Apache implementations.
Since chopping xmlns:xml shouldn't ever corrupt a signature and is never needed anyway, it would be best to just ignore it during unmarshalling and marshalling, as well as in the inclusive prefix list tree walk.
The code is currently preserving the xmlns:xml namespace declaration when it's set to the default value. This tends to cause a lot of signature interop issues because it's a subtle c14n point that it shouldn't be serialized, and has been a source of bugs in both Apache implementations.
Since chopping xmlns:xml shouldn't ever corrupt a signature and is never needed anyway, it would be best to just ignore it during unmarshalling and marshalling, as well as in the inclusive prefix list tree walk.