How and where could I output log messages for debug and performance purposes during an XSLT transformation?
I guess the simplest method is using express
Modifying your XSLT itself for the purposes of logging is inevitably going to impact on performance, you're probably better off using an external tool. There are a few available depending on what you're working with: