throws IOException, CanonicalizationException,
InvalidCanonicalizerException, ParserConfigurationException,
SAXException {
try {
Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments();
byte[] result = null;
if (input.isOctetStream()) {
result = c14n.engineCanonicalize(input.getBytes());
} else {
result = c14n.engineCanonicalizeXPathNodeSet(input.getNodeSet());
}
return new XMLSignatureInput(result);
} catch (ParserConfigurationException ex) {
Object[] exArgs = { ex.getMessage() };
CanonicalizationException cex = new CanonicalizationException(