case 2: // XML_C14N_1_1 = 2
if (with_comments) algorithmURI = Canonicalizer.ALGO_ID_C14N11_WITH_COMMENTS;
else algorithmURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
}
try {
Canonicalizer canonicalizer = Canonicalizer.getInstance(algorithmURI);
XmlNode startingNode = getStartingNode(block);
byte[] result;
CanonicalFilter filter = new CanonicalFilter(context, block);
if (inclusive_namespace == null) {
result = canonicalizer.canonicalizeSubtree(startingNode.getNode(), filter);
} else {
result = canonicalizer.canonicalizeSubtree(startingNode.getNode(), inclusive_namespace, filter);
}
String resultString = new String(result, "UTF-8");
return stringOrNil(context.getRuntime(), resultString);
} catch (CanonicalizationException e) {
// TODO Auto-generated catch block