XSLT is amazing.

It really is. It's extremely handy albeit a bit niche these days.

XSLT is very useful to transform nested structures.

The input has to be XML, but you can get there via YAML, JSON, tree-sitter etc. And the output doesn't have to be XML.

xsltproc is usually easy to install.