If xmlSource and xsl are strings containing the actual XML text, rather than a filename or URL, then you should use
new StreamSource(new StringReader(xmlSource))
You may also need to call setSystemId() on the StreamSource object, if there are any URIs in the XML than need to be resolved.
It's not clear what xmlTarget is supposed to be. To return the result as a string, do
StringWriter sw = new StringWriter();
transformer.transform(source, new StreamResult(sw));
return sw.toString();
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference