*/
public static <T> String doXSLT20(Source xmlSource, Source xsltSource, Map<String, T> parameters, URIResolver resolver) throws TransformerConfigurationException, TransformerException {
// Prepare transformer
ByteArrayOutputStream transformOut = new ByteArrayOutputStream();
Result result = new StreamResult(transformOut);
TransformerFactory transFact = new TransformerFactoryImpl();
if (resolver != null) {
transFact.setURIResolver(resolver);
}
// Perform Transform
Transformer trans = transFact.newTransformer(xsltSource);
// set the parameters that are passed to the stylesheet
if (parameters != null) {
Iterator<Entry<String, T>> it = parameters.entrySet().iterator();
while (it.hasNext()) {
Entry<String, T> entry = it.next();