CanonicalizerBase canonicalizerBase;
if (omitComments) {
canonicalizerBase = new Canonicalizer11_OmitCommentsTransformer();
canonicalizerBase.setOutputStream(baos);
} else {
canonicalizerBase = new Canonicalizer11_WithCommentsTransformer();
canonicalizerBase.setOutputStream(baos);
}
XMLEventReader xmlSecEventReader = xmlInputFactory.createXMLEventReader(fileIn.openStream());
while (xmlSecEventReader.hasNext()) {