for (Iterator t = services.iterator(); t.hasNext(); ) {
Service s = (Service)t.next();
String value = s.getAttribute("MechanismType");
if ((value == null && dom) ||
(value != null && value.equals(mechanismType))) {
Instance instance = GetInstance.getInstance(s, null);
TransformService ts = (TransformService) instance.impl;
ts.algorithm = algorithm;
ts.mechanism = mechanismType;
ts.provider = instance.provider;
return ts;