It shouldn't be too hard to write some xslt to script the edit Dan suggests.
For the two errors you report, I think that the second requires -exsh (or one one the other command-line args to the tool) and the other requires a minimal import element that specifies the namespace but no system id. > > > >
