Is There An XSL Code Generator That Can Create XSLT By Example?
What you're asking is, essentially, "Given a set of input data and an output, is it possible to infer the logic of a program that will produce that output?" Except for the trivial case - where the program produces the provided output irrespective of the input - the answer is "No."
XSLTGen looks promising and exactly what you're looking for.
Update: (4-Apr-2015) Updated the link to the correct link as pointed to by: @user326608
try ALTOVA MapForce (http://www.altova.com/mapforce.html)