// Use KeySerializer to serialize Key
ValueSerializer keySerializer = new ValueSerializer();
keySerializer.serializeValue(xsltKey, XMLConfigConstants.KEY, xslt);
} else {
throw new MediatorException("Invalid XSLT mediator. XSLT registry key is required");
}
saveTracingState(xslt, this);
if (source != null) {
SynapseXPathSerializer.serializeXPath(source, xslt, "source");
}
if (targetPropertyName != null) {
xslt.addAttribute(fac.createOMAttribute(
"target", nullNS, targetPropertyName));
}
serializeMediatorProperties(xslt, properties, PROP_Q);
if (!transformerFactoryFeatures.isEmpty()) {
for (MediatorProperty mp : transformerFactoryFeatures) {
OMElement prop = fac.createOMElement("feature", synNS, xslt);
if (mp.getName() != null) {
prop.addAttribute(fac.createOMAttribute("name", nullNS, mp.getName()));
} else {
throw new MediatorException("The Feature name is missing");
}
if (mp.getValue() != null) {
prop.addAttribute(fac.createOMAttribute("value", nullNS, mp.getValue()));
} else {
throw new MediatorException("The Feature value is missing");
}
}
}
serializeMediatorProperties(xslt, transformerFactoryAttributes, ATTRIBUTE_Q);