XMLTransformerMap map = (XMLTransformerMap) value;
TransformerBase transformer = map.getTransformer();
Object transformerSubject = map.getTransformerSubject();
try {
transformer.transform(transformerSubject, output);
} catch (TransformerException e) {
// TransformerException do not respect the Exception.getCause() contract
Throwable cause = e.getCause() != null ? e.getCause() : e.getException();
// we need to propagate the RuntimeException
if (cause instanceof RuntimeException) {