Map<String, String> namespace = new HashMap<String, String>();
namespace.put("ietf", "http://www.ietf.org");
XPathFactory xpf = XPathFactory.newInstance();
XPath xPath = xpf.newXPath();
DSNamespaceContext namespaceContext =
new DSNamespaceContext(namespace);
xPath.setNamespaceContext(namespaceContext);
NodeList nodes = (NodeList)xPath.evaluate((String) xpath, doc, XPathConstants.NODESET);
Canonicalizer c14n =
Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);