XPath is not procedural. It is entirely composed of expressions that compose and return results. The closest common language might be SQL.
It was pain and suffering developing these style sheets, but once done it worked like a charm.
Was Adobe FrameMaker involved?
2.0 was (maybe still is?) supported by Saxon, a proprietary library, needing to be licensed. Built-in support was capped at 1.5.
If I remember, in order to run XSLT 2.0, you had to license and install Saxon on your server (i believe it was a Java application, meaning the server need to have a JVM), then call it, using system calls. Awkward, at best.
But this was many moons ago. I suspect/hope that things have improved, since then.
XQuery 3.1 has multiple open source implementations: Saxon, BaseX, xidel, and xqerl.
It's very cool, but also, very strange, if you come from a procedural language background.
Also, XSLT is really given power by being mixed with XPath (which is procedural).
I suspect that if I had known more about FP back when I learned it, I would have had an easier time. I wrote up a really long, painful post about XSLT, way back in the early 'oughts.