+ " xmlns:n1=\"http://b.example\">content</n1:elem1>";
ByteArrayOutputStream out = new ByteArrayOutputStream();
Canonicalizer canonicalizer = new Canonicalizer(out,
Canonicalizer.EXCLUSIVE_XML_CANONICALIZATION_WITH_COMMENTS);
XPathContext context = new XPathContext("n1", "http://b.example");
Document doc = new Document(pdu);
canonicalizer.setInclusiveNamespacePrefixList("n0");
canonicalizer.setInclusiveNamespacePrefixList(null);
Nodes subset = doc.query(
"(//. | //@* | //namespace::*)[ancestor-or-self::n1:elem1]",