There are many ways of doing it in Java, and there are many ways of doing it in XSLT, both in terms of how you write your code, and in terms of what products you use (e.g. different parsers, different tree models, different XSLT processors). Your results may well tell you more about your Java and XSLT programming skills than about the technology you are using. As @Tomalak says, measure it, publish your results, and invite people to comment on their validity / reproducibility.
It's quite likely the cost will be dominated by the cost of XML parsing, which is in principle the same either way. However, some tree models are more efficient than others; the DOM, which most people use, is probably the worst choice.