if (representation instanceof XmlRepresentation) {
result = ((XmlRepresentation) representation).getSaxSource();
} else if (representation instanceof TransformRepresentation) {
final TransformRepresentation source = (TransformRepresentation) representation;
XMLReader reader = new AbstractXmlReader() {
/**
* Parses the input source by sending the result event to the
* XML reader's content handler.
*