Canonicalizer c14n =
Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS);
Element nscontext = createDSctx(doc, "ds", Constants.SignatureSpecNS);
Node signedInfo = XPathAPI.selectSingleNode(doc, "//ds:SignedInfo", nscontext);
c14n.canonicalizeSubtree(signedInfo);
NamedNodeMap attributes = signedInfo.getAttributes();
boolean foundBase = false;
for (int i = 0; i < attributes.getLength(); i++) {
Node attribute = attributes.item(i);