try {
XMLSignatureInput input = this.getContentsBeforeTransformation();
XMLSignatureInput output = input;
Transforms transforms = this.getTransforms();
Transform c14nTransform = null;
if (transforms != null) {
doTransforms: for (int i = 0; i < transforms.getLength(); i++) {
Transform t = transforms.item(i);
String URI = t.getURI();
if (URI.equals(Transforms
.TRANSFORM_C14N_EXCL_OMIT_COMMENTS) || URI
.equals(Transforms
.TRANSFORM_C14N_EXCL_WITH_COMMENTS) || URI
.equals(Transforms
.TRANSFORM_C14N_OMIT_COMMENTS) || URI
.equals(Transforms
.TRANSFORM_C14N_WITH_COMMENTS)) {
c14nTransform = t;
break doTransforms;
}
output = t.performTransform(output);
}
output.setSourceURI(input.getSourceURI());
}