This is a snippet of code to show how to perform an XSL transformation with Java

Below you can see how to XSL Transform using File, StreamSource and StreamResult.

 

And there it is an example of XSL Transform using StringReader and StringWriter.

 

Source code is available on my Git repository:

.