Popular Java-based XSLT processors such as Saxon and Xalan support a programming interface called JAXP. You can find examples of simple applications that use JAXP to perform XSLT transformations in the saxon-resources file on the Saxon site at Sourceforge.net. Look for TraxExamples.java. (Trax is an older name of the JAXP transformation API)
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference