try {
Element inclusiveElement =
this._transformObject.getChildElementLocalName(0,
InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES);
InclusiveNamespaces inclusiveNamespaces = null;
if (inclusiveElement != null) {
inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
this._transformObject.getBaseURI());
}
Canonicalizer20010315ExclWithComments c14n =
new Canonicalizer20010315ExclWithComments();
if (input.isOctetStream()) {
return new XMLSignatureInput(c14n
.engineCanonicalize(input.getBytes()));
} else {
if (inclusiveNamespaces == null) {
return new XMLSignatureInput(c14n
.engineCanonicalizeXPathNodeSet(input.getNodeSet()));
} else {
return new XMLSignatureInput(c14n
.engineCanonicalizeXPathNodeSet(input
.getNodeSet(), inclusiveNamespaces
.getInclusiveNamespaces()));
}
}
} catch (IOException ex) {
throw new CanonicalizationException("empty", ex);