Yes, it can be implemented as a plugin.
As for XSLT, if you are happy with it, more power to you, I dont care what tool you like to use
Looka t the example editor plugin int he maual. If you want to get the name of the currently open file, use
self.boss.currently_editing