> Granted that it's insane (and I appreciate your opinion about this) is it > *documented* insanity, or is it defined by implementation? From my limited > reading, it seems to be a very grey area. The c14n documentation doesn't > mention the DOM at all, but there may be some documentation on the DOM side > that I'm unaware of.
It's not documented any *other* way, that's kind of the only way to say it. If you follow the text, you find that when handing a c14n engine a DOM element (and an implied node set of everything below it), nothing in the spec says to create a namespace declaration if one isn't already present. The lone exception is the InclusivePrefixes list. So if it's not declared, it won't get declared, and the XML that results won't be well-formed (and therefore probably isn't what you meant to sign). Serializers are not the same as a c14n engine, and it isn't typical to use one before you sign a DOM, so using serializers to "fix up" namespaces is really not part of a robust signing application. -- Scott