santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Dittmann <Werner.Dittm...@t-online.de>
Subject Re: Undeclared namespace prefix
Date Thu, 02 Oct 2008 16:34:24 GMT
After a small update of the test like this:

....
         Canonicalizer c14n =
                 Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS);
         System.out.println("Before c14n");
         Node n = WSSecurityUtil.findElement(doc.getDocumentElement(), "KeyInfo", "http://www.w3.org/2000/09/xmldsig#");
         if (n == null) {
             System.out.println("KeyInfo not fond");
         }
         else {
            System.out.println(n.getLocalName() + ", " + n.getNamespaceURI());
         }
         System.out.println(XMLUtils.PrettyDocumentToString(doc));
         byte[] canonicalMessage = c14n.canonicalizeSubtree(doc);
         System.out.println("After c14n: " + new String(canonicalMessage));
....

the findElement(...) function finds a node, then the code prints its local
name and the namespace URI:

Before c14n
KeyInfo, http://www.w3.org/2000/09/xmldsig#

After running c14n the xmlns: namespace binding is gone.
findElemen(...) is just a lookup function to find an element according to
the parameters and it does not modify the doc tree in any way.

Except for the new printout the output of this test of xmlsec-1.4.2 is the
same as attached to my last e-mail

Regards,
Werner


Scott Cantor schrieb:
>> Is is still necessary to file a new bug for this, or has Werner's work
>> covered this?
> 
> I think it's still being investigated. If there's no bug filed yet, I would
> suggest doing so, and send Werner the bug number so he can attach the
> results of his tests.
> 
> -- Scott
> 
> 
> 


Mime
View raw message