XSLT is a strictly functional language, meaning that all variables are immutable (they can't be changed at runtime). This has caused me quite a few headaches, but once you use a language like Scheme then the pieces start to fall into place.

Also, XSLT can be used to emit any documents - not just XML. You can produce HTML, text files, CSV databases, and so on.

The actual transformation of the XML data is performed by an XSLT engine. The only one I've got any experience with is the Apache Group's Xalan for Java and C++.