Laurence already mentioned xsltproc. There are also other XSLT processors packaged for Linux distributions. Here is a partial list:
- Saxon 6.5.x (XSLT 1, Java) - Ubuntu, Debian
- Saxon-B (XSLT 2, Java) - Ubuntu, Debian
- Xalan-C++ (XSLT 1, C++) - Ubuntu, Debian
- Xalan-Java (XSLT 1, Java) - Ubuntu, Debian
- xsltproc (XSLT 1, C) - Ubuntu, Debian
All of the packages come with some way of invoking the XSLT processor from the command line so that it can be used from shell scripts, etc.
Building on all of the above and a little more there is also DITA and specifically the DITA Open Toolkit to transform most XML types into other types using XSLTs:
- DITA-OT (XSLT 1 and 2, Java) - use Java install for all platforms
- DITA-OT docs (documentation for the above) - use DITA-OT to transform
- D4P (additional transformation recipes to meet non-tech writing needs)
All open source with permissive licensing (mostly Apache 2.0 or BSD/MIT) as these are specification implementations to be used for any purpose, including commercial purposes. Most commonly they're used to transform DITA to various types HTML and XHTML or DocBook to the same, but there are other recipes in there. The only real limitation is in the availability of XSLTs. The DITA for Publishers User Guide shows how to expand on these recipes with new plugins.