DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41821>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41821 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 2007-03-13 15:09 ------- This is not a bug. You need to always use the namespace-aware DOM L2 Element.setAttributeNS() method (instead of setAttribute) when creating attributes, even namespace attributes. Otherwise, the C14n algorithm doesn't "see" these namespace attributes when canonicalizing and that is why the results did not match. I changed the following lines in your code and it now works fine: //element.setAttribute("xmlns:" + XML_SIGNATURE_PREFIX, // XMLSignature.XMLNS); //element.setAttributeNS("xmlns:" + XAdES_XMLNS_PREFIX, // XAdES_XMLNS); element.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + XAdES_XMLNS_PREFIX, XAdES_XMLNS); element.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + XML_SIGNATURE_PREFIX, XMLSignature.XMLNS); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.