try {
String inclusiveNamespaces = null;
if (this._transformObject
.length(InclusiveNamespaces
.ExclusiveCanonicalizationNamespace, InclusiveNamespaces
._TAG_EC_INCLUSIVENAMESPACES) == 1) {
Element inclusiveElement =
XMLUtils.selectNode(
this._transformObject.getElement().getFirstChild(),
InclusiveNamespaces.ExclusiveCanonicalizationNamespace,
InclusiveNamespaces._TAG_EC_INCLUSIVENAMESPACES,0);
inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
this._transformObject.getBaseURI()).getInclusiveNamespaces();
}
Canonicalizer20010315ExclWithComments c14n =
new Canonicalizer20010315ExclWithComments();
if (os!=null) {
c14n.setWriter( os);
}
input.setNeedsToBeExpanded(true);
byte []result;
result =c14n.engineCanonicalize(input, inclusiveNamespaces);
XMLSignatureInput output=new XMLSignatureInput(result);
return output;
} catch (XMLSecurityException ex) {
throw new CanonicalizationException("empty", ex);
}