}
Element transformParamElem =XMLUtil.createElement
(ownerDoc, "TransformationParameters", WSSE, prefix);
CanonicalizationMethod cm = params.getCanonicalizationMethod();
Element c14nElem = XMLUtil.createElement
(ownerDoc, "CanonicalizationMethod", XMLSignature.XMLNS, dsPrefix);
c14nElem.setAttributeNS(null, "Algorithm", cm.getAlgorithm());
C14NMethodParameterSpec cs =
(C14NMethodParameterSpec) cm.getParameterSpec();
if (cs != null) {
TransformService cmSpi = null;
try {
cmSpi = TransformService.getInstance( cm.getAlgorithm(),"DOM");
cmSpi.init(cs);
cmSpi.marshalParams(new DOMStructure(c14nElem), context);
} catch (Exception e) {
logger.log(Level.SEVERE,LogStringsMessages.WSS_1321_STR_MARSHAL_TRANSFORM_ERROR(),e);
throw new MarshalException(e);