> Is this the way things ought to be, or should the canonicalization be > checking the namespace and prefix components on each element, and including > an xmlns attribute when any change occurs between an element and its parent?
I'm not certain, but I don't think that's actually part of the spec. Technically, I don't think c14n is required to emit well-formed XML, and it also doesn't really say that you have to *create* namespace declarations. It just says when you include the ones that are found, I think. In any case, a proper serialization mechanism that starts with a DOM has to be able to generate the right namespace declarations, or it's leaving an awful lot to the application. But it isn't automatic by any means. -- Scott